This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Serial Wire Debug AP access

Note: This was originally posted on 15th March 2011 at http://forums.arm.com

Please somebody help me with this issue.
I am trying to program the flash memory using Serial wire Debug in a  STM32L152 advanced ARM-based 32-bit MCU.
I will be almost done if this issue gets cleared. I am able to do read and write  accesses on each of the  DP registers if they actually allow to do so.And when I try to read one of the AP registers, it gives me  an 'OK' response.  But when I read the value, it gives all zeroes. After  that I tried to read the Read Buffer register. Still the same answer.  Also when I try to write one of the AP registers, it gives an 'OK'  response. Then I sent some 32 bits with a parity bit to be written. But  after that the 'STICKYERR' bit got set in the CTRL/STATUS register  with the data not being written I hope,which means some bus error has  occurred. What may be the problem? At least I should be able to do read  and write accesses in the CSW-AP register. Am I right? I thing I may not  be aware of some important issue. I would be very much grateful to you  if you could spend a little time in clarifying my doubt.

What is the importance of the Clock signal in AP access? Will it be a reason for the above issue?


Parents
  • Sir,

    I am working on Cortex m4 architecture over serial wire debug protocol my controller is stm32f407vg as host and stm32f407vg as target, I am able to read IDCODE(0x2ba01477 from target) which is correct as per the arm technical reference manual,and I am successfully writing 0x50000000 to CTRLSTAT register to enable CSYSPWRUPREQ and CDBGPWRUPREQ ,but the thing is while i am reading CTRLSTAT i got 0xfffffff I don't know what might be the Problem,Please suggest me what might be the Possible reason??

    Thanks & Regards.

Reply
  • Sir,

    I am working on Cortex m4 architecture over serial wire debug protocol my controller is stm32f407vg as host and stm32f407vg as target, I am able to read IDCODE(0x2ba01477 from target) which is correct as per the arm technical reference manual,and I am successfully writing 0x50000000 to CTRLSTAT register to enable CSYSPWRUPREQ and CDBGPWRUPREQ ,but the thing is while i am reading CTRLSTAT i got 0xfffffff I don't know what might be the Problem,Please suggest me what might be the Possible reason??

    Thanks & Regards.

Children
No data