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
  • thanks for quick reply,

    i got error resolved, the problem is each time while writing i selcting CSW register, with out that i wrote the following sequence

    setting CSW register with proper bit settings then

    TAR = FLASH_KEYR

    DRW = KEY1

    idle cycle

    TAR = FLASH_KEYR

    DRW = KEY2

    idle cycle

    now i am reading

    FLASH_CR = 0x00000000

    FLASH_SR = 0x000000C0

    after above

    i wrote data to flash memory as following procedure

    checking BSY bit in FLASH_SR register wait until this bit is cleared.

    setting PG bit and 32bit selection by

    FLASH_CR = 0x00000201

    after that I am trying to read the FLASH_CR and FLASH_SR register

    but i got as following

    FLASH_CR = 0x00000000

    FLASH_SR = 0x000000C0

    data is not updated on FLASH_CR register???

    my doubt is after halt and reset no registers are modified why??

Reply
  • thanks for quick reply,

    i got error resolved, the problem is each time while writing i selcting CSW register, with out that i wrote the following sequence

    setting CSW register with proper bit settings then

    TAR = FLASH_KEYR

    DRW = KEY1

    idle cycle

    TAR = FLASH_KEYR

    DRW = KEY2

    idle cycle

    now i am reading

    FLASH_CR = 0x00000000

    FLASH_SR = 0x000000C0

    after above

    i wrote data to flash memory as following procedure

    checking BSY bit in FLASH_SR register wait until this bit is cleared.

    setting PG bit and 32bit selection by

    FLASH_CR = 0x00000201

    after that I am trying to read the FLASH_CR and FLASH_SR register

    but i got as following

    FLASH_CR = 0x00000000

    FLASH_SR = 0x000000C0

    data is not updated on FLASH_CR register???

    my doubt is after halt and reset no registers are modified why??

Children