- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I need some help regarding the bootloader.
I have implemented it acording to the AN from Cypress.
My needs : to be able to use the bootloader through Power On Reset AND Software reset
with the following source code which comes from the Cypress AN :
BootLoader(void){
// Check conditions for remote programming only through UART
// if was Power On Reset then check this
if (CPU_SCR0 & CPU_SCR0_PORS_MASK{
// Initiate UART Module
//bootloader update firmware
Everything work fine while the WDT is disabled. I can acces to the bootloader by the two ways (POR and Software reset).
As soon as the WDT is enabled, only the POR works. Due to the if (CPU_SCR0 & CPU_SCR0_PORS_MASK, it looks like normal.
BUT, if I modify the bootloader by commenting the if line:
BootLoader(void){
// Check conditions for remote programming only through UART
// if was Power On Reset then check this
//if (CPU_SCR0 & CPU_SCR0_PORS_MASK{
// Initiate UART Module
//bootloader update firmware
In that case, the bootloader should work whatever the source of reset. In pratice, when the WDT is enabled, if I make a software reset, the software crashes after the SW_Reset instruction.
2 questions:
- with the if (CPU_SCR0 & CPU_SCR0_PORS_MASK and WDT enabled , may I have a solution to go Inside the if (except POR of course?). Once the WDT is enabled I have no possiblity to disable it.
- May I use my bootlaoder without the if (CPU_SCR0 & CPU_SCR0_PORS_MASK and WDT enabled ? it seems not in my case????
Thanks a lot for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
if the condition CPU_SCR0 & CPU_SCR0_PORS_MASK is true, the WDT is disabled. Enabling WDT when boot loading is not practical, due to the flash writes involved.
Thanks,
Sampath