cancel
Showing results for 
Search instead for 
Did you mean: 

Stop interrupt during BootLoader

Barbie
Associate II
Posted on March 27, 2013 at 02:31

Hi.

I am using AN2557 appilication as my base line for BootLOader.

I have some question.

1. If I use the systick int during that time, is there any period I have to close it , like during FLASH programming or going to the main app?

2. If S0 how I can disable/enable the systick IRQ every time? I didn't find a function for that?

Thanks

#systick-interrupt-disable
3 REPLIES 3
Posted on March 27, 2013 at 03:35

I guess it depends on why you need to disable it, or why you need it in the first place. Just be conscious as you pass control from the boot loader to the app that you don't want to be incrementing random locations in the other's address space.

You can disable the counter, and you can also just disable the interrupt generation :

SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;

Every time what? I'm not sure you mean. Ideally when doing stuff with flash programming you don't want to be executing or reading anything for flash, which can include interrupts that will cause you to touch flash. You don't want to cause the CPU to stall as this can interfere with your ability to service peripherals (ie USART, watchdog) in a timely manner. It's not fatal with things like XMODEM because you can time you flash writing in the period the host is not sending data, but waiting for your acknowledgement. The timeout expectations on the host need to reflect the dwell time required to program the block.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Barbie
Associate II
Posted on March 27, 2013 at 12:38

Thanks for the answers.

1. What do you mean by ''incrementing random locations in the other's address space''.

I need to make a timeout during the Boot time and in the application configure again the systick. As i understand it write the IRQ again in diffrent location avilable only for the main application.

2. As I read somewhere before, someone write it is not recommanded to leave the systick active. I just don't know if it has to be disable every time i write to the FLASH or only when I move from the Boot app to the main App.

Reagrds

Bar. 
Posted on March 27, 2013 at 13:35

The SysTick routines in the Boot Loader and App have different ideas about where 'Ticker++;' lives.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..