cancel
Showing results for 
Search instead for 
Did you mean: 

Did I just brick my board with a WFI?

hbarta2
Associate III
Posted on June 08, 2015 at 18:53

Hi folks,

I find I am no longer able to download code to my target system (custom board) Using an IAR I-Jet on an SWD connector. The last code change I made was to add __WFI() to the end of my main loop.

In this thread https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy%2est%2ecom%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fWhat%20could%20stop%20SWD%20from%20working&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=324

I see Clive's comment:

''

SWD/JTAG commonly fail due to DMA, WFI loops, interference with the GPIO pins being used, and low power modes.''

I added the __WFI() at the end of the main loop. The most frequent interrupt is SysTick at 1 KHz.

Is there any workaround I can try to update the code?

Thanks!

#worst-forum-software-ever
5 REPLIES 5
Posted on June 08, 2015 at 19:07

Strap BOOT0 High, reset, and nuke it from orbit, it's the only way to be safe...

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
hbarta2
Associate III
Posted on June 08, 2015 at 20:47

Thanks for the suggestion.

Previous version of project downloads w/out difficulty.

Long replies get eaten by the Forum S/W >:(

Problem back. :(

Solution:

- pull BOOT0 high

- reset

- release BOOT0

- download

- Profit!

I've put in a 15s delay when the app starts before it starts using WFI at the end of the main loop. Hopefully that will allow the debugger to grab control of the processor before WFI interferes.

Posted on June 08, 2015 at 20:53

Long replies get eaten by the Forum S/W >:(

It can be a PITA that's for sure, the biggest is that it doesn't think you're logged in, and you either try to reply into a NULL thread, or it times out if you spend to long writing. One of the biggest tells that it's going to fail is it doesn't give the thread title on the page, and it looks like Microcontrollers > STM32 > New Item
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
tm3341
Associate II
Posted on June 09, 2015 at 09:10

Just connect under reset and your are done.

No need for any BOOT pin changes.

Posted on June 10, 2015 at 05:25

Yeah, I'm not that familiar with the IAR I-Jet

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