xc2733x command sequence error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
hi,

I am using xc2733x microcontroller in my project,
I want to write something in my flash , for this i am using command sequence mentioned in user mannual,

My problem is , as i powered up my device it is setting the PWR bit in IMB_FSR_OP register,

and whenever i try to send any command it raises IMB_FSR_OP.SQER bit.
Even if i try to pass CLEAR_STATUS or RESET_TO_READ command it sets the SQER bit.
Can anyone help me coming out of this issue?
Any suggestion/feedback is valuable for me.

Thanks
0 Likes
3 Replies
chismo
Employee
Employee
First like received
Hello,

From the user's manual, I see that the POWER bit in IMB_FSR_OP register is specified to be not automatically reset but must be cleared by a “Clear Status” command.

Regarding the second point, could you share your code?
I did a simple test with CLEAR_STATUS on a XC2722x starter kit, and it worked fine. IMB_FSR_OP is cleared to 0x00 from 0x04.
void main(void)
{
// USER CODE BEGIN (Main,2)
unsigned int *Flash_Command_1 = (unsigned int *) 0x0c000AA;
// USER CODE END

MAIN_vInit();

// USER CODE BEGIN (Main,3)
// clear status command sequence
*Flash_Command_1 = 0x00F5;
// USER CODE END


Regards,
Min Wei
0 Likes
Not applicable
Thanks chismo, but it worked for me.

Actually i was running my code in flash 2(0x00C40000) so instead of using

unsigned int *Flash_Command i used unsigned int far *Flash_Command

may be this is the case the pointer is searching in near pages, so using a far pointer worked for me.
0 Likes
chismo
Employee
Employee
First like received
Since the issue is solved, I will close this thread.

Regards,
Min Wei
0 Likes