2014-01-14 01:24 PM
I'm quite likely missing something obvious to someone, but so far this is eluding me :)
I've got an STM32F205RE by itself on a breadboard (no eval or discovery board here.) I'm using libopencm3 for linker-script and some sample code, and using the https://launchpad.net/gcc-arm-embedded toolchain, along with openocd for flashing. Linux based environment. I've added external 8mhz crystal and associated caps to ground, and using the libopencm3 go-to-120MHz function, but nothing else on the board. Code in question is quite short, here: http://pastebin.com/xTxn5829 Essentially a blinking light hello world app, but goal being to toggle the LED in an ISR callback from the timer. I have a variation of that code that polls the timer and works fine .. so I know I can build code and deploy it okay in general, but this particular version isn't working. I suspect something out of the code (so the vector table is goofy, and my ISR function is not being seen at all?), or perhaps I'm just missing a register assignment somewhere. I'm new to STM32 world so trying to get my head around the documentation and so on .. if you spot anything, let me know :) I'm using linkerscript as from libopencm3-examples, though modified to have the right ROM and RAM size for my chip (since there is onyl 1 sample for the F2 chip). In case its a deployment issue, I'm deploying like this: openocd -f interface/stlink-v2.cfg \ -f target/stm32f2x_stlink.cfg \ -c ''init'' -c ''reset init'' \ -c ''stm32f2x mass_erase 0'' \ -c ''flash write_image miniblink.hex'' \ -c ''reset'' \ -c ''shutdown'' $(NULL) I flash the code, hit reset on the chip (pull it to ground for a moment), and then led just stays on. I've not hooked up any debugger yet (next thing to figure out), so I'm not sure if its crashed or hanging on blocked interupts or what. Thank you for any help, and for your patience in reading, jeff2014-01-15 08:39 AM
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Problem%20with%20DMA-USART%20Rx%20on%20STM32F407VG&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=148]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FProblem%20with%20DMA-USART%20Rx%20on%20STM32F407VG&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=148
The NOP is not particularly effective at fencing memory operations.2014-01-15 08:45 AM