jpc wrote:the IV, IVLEVEL and ICS only inform the compiler(which uses this information to optimize context saving i suppose) , they do not set anything ( no code is generated ) so we have to set the interrupt priority in our initialisationcode.
Make sure the 2 are identical or you make encounter ( usually nasty) surprises.
Thanks for the explanation!
jpc wrote:Setting these priorities is best done by setting the individual bits, these are all nicely labeled in the definitionfile, for the USB interface they are called USBIPx_bit, for other interfaces these have similar labels.
Yes, indeed.
jpc wrote:The documentation of these P32 chips is a bit difficult sometimes, you will have to go through quite some different documents sometimes, for good understanding of all peripherals there are separate documents. These priority registers are documented if i remember well in the general datasheet of the family you use.
Well, I found out that in the "Family reference" datasheet of PIC32 (section interrupts), and there only the registers "IPCx" are mentioned, wheren "x" is not specified further.
In the datasheet of the "PIC32MX5XX/6XX/7XX" itself I can find all registers actually available, including the "USBIP" bits, residing in "IPC11". For the meaning of the "IPC11" bits I have to go back to the Family reference datasheet...
I expected then in the reference section "USB" a reference to "USBIP", but there was none.
So, it is indeed as you say: one has to look into a lot of documents...
Thanks for all info and the quick answer!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)