2015-12-29 11:51 PM
Hi there
I am planning to use the STM32F030F4 for an application where I have a main interface header that I also want to use to program the micros in production. I am pin limited on the header so this means I need to ''multiplex'' the use of the SWDIO and SWCLK pins.What I am looking for is a simple way to figure out when booting as to whether I am hooked up to a programmer/debug unit or not so I can choose whether to map the SWDIO/SWCLK pins to their alternate functions or not.Thanks and regardsGrant #serial-wire-debug2015-12-30 05:56 AM
So have it delay, or switch mode based on a GPIO or USART input?
Pulling BOOT0 high is going to have the chip run it's internal System Loader, and not your code, so the pins should function normally.2015-12-30 09:40 PM
Sir,
I am working on Cortex m4 over Serial Wire Debug protocol, with some googling i found '' http://markdingst.blogspot.in/2014/03/programming-internal-sram-over-swd.html '' based on this i am trying to access debug core register i am using STM32f407 as host and STM32f407 as targetthe sequence i wrote as following.Host :
1->sending >50 clocks2->sending jtag to swd sequence 0xE79E(LSB first)
3->sending >50 clocks
4->sending idcode code packet 1|0|1|0|0|1|0|1 = 0xA5
5->sending 1 clock pulse (Turn around Time) changing the direction waiting for ack
6->collecting 3 bits by sending 3 clock pulses
Target
: ACK SuccessHost :
7->after success ack sending 33 clock pulses 32(data)+1(parity)
target :
0x2ba01477Host :
8->sending 1 clock pulse turnaround period
9->setting CTRLSTAT register CSYSPWRUPREQ and CDBGPWRUPREQ bits by sending packet 1|0|0|1|0|1|0|1 = 0x95
and data = 0x50000000
target :
(ACK success)
Host :
10->reading CTRLSTAT register by sending packet 1|0|1|1|0|0|0|1 = 0xB1
11->after success ack sending 33 clock pulses 32(data)+1(parity)
target :
0xffffffff with parity error i don't understand where might be the error could you please suggest me where might be the error Thanks & Regards