µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: LuisHS on March 10, 2020, 10:52:05 AM
-
Hello Mark.
I have a problem using the bootloader by SD card. My program works perfectly if I burn it directly to the microcontroller, a Kinetis MK66, using a Jlink.
But if I load it using the bootloader, the start of the program, that turns on/off several LEDs of a LED matrix works perfectly, so I know that the program has been loaded and is running. But what runs next in the program does not work, several GPIOs activated by interrupts must be read.
Is there anything to consider using the uTasker SD bootloader, if the program to be loaded uses interrupts?. I tried to compile my program generating Debug and Release versions, with optimization disabled, program start address always 0x8000.
-
Luis
Check Appendix B of the serial loader document for a check-list for compatibility:
https://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf
When the loader starts the application it performs:
uDisable_Interrupt(); // ensure interrupts are disabled when jumping to the application
RESET_PERIPHERALS(); // reset peripherals and disable interrupts ready for jumping to the application
start_application(_UTASKER_APP_START_); // jump to the application
The macro RESET_PERIPERALS() ensures that any possible pending interrupts are cleared but you can check to see whether it may need to do something more to ensure your application isn't disturbed by previous peripheral usage.
Regards
Mark