CTRLSTAT = 0xffffffff

Sir,

I am working on Cortex-M4 over serial wire debug protocol, i am able to read IDCODE(0x2ba01477) which is correct as per arm cortex m4 technical reference manual, and i am writing 0x50000000 to CTRLSTAT register to enable CSYSPWRUPREQ and CDBGPWRREQ which is also success without any ACK error,but the thing is when i am trying to read the CTRLSTAT register i got 0xffffffff . I don't understand what might be the problem,Please suggest me what would be the problem??

Thanks & Regards

Parents
  • Try writing 0x00000200 first, then 0x00000201.

    For instance:

    read 0x40023c0c  (FLASH_SR)

    read 0x40023c10 (FLASH_CR)

    0x40023c10 = 0x00000200;

    read 0x40023c0c  (FLASH_SR)

    read 0x40023c10 (FLASH_CR)

    0x40023c10 = 0x00000201;

    read 0x40023c0c  (FLASH_SR)

    read 0x40023c10 (FLASH_CR)

    -But before that, I think it would be a good idea to read FLASH_OPTCR (0x40023c14) and check that it allows you to write to the Flash-memory.

    This could also be a power issue. Make sure VOS in PWR_CR is set to Scale1 mode. (there's also a VOS_RDY bit you'll have to wait for)

Reply
  • Try writing 0x00000200 first, then 0x00000201.

    For instance:

    read 0x40023c0c  (FLASH_SR)

    read 0x40023c10 (FLASH_CR)

    0x40023c10 = 0x00000200;

    read 0x40023c0c  (FLASH_SR)

    read 0x40023c10 (FLASH_CR)

    0x40023c10 = 0x00000201;

    read 0x40023c0c  (FLASH_SR)

    read 0x40023c10 (FLASH_CR)

    -But before that, I think it would be a good idea to read FLASH_OPTCR (0x40023c14) and check that it allows you to write to the Flash-memory.

    This could also be a power issue. Make sure VOS in PWR_CR is set to Scale1 mode. (there's also a VOS_RDY bit you'll have to wait for)

Children