PSoC Creator export to IAR Debug problem

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

cross mob
lock attach
Attachments are accessible only for community members.
XiaoPing_Yang
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hi Sir ,

      Now I  am using CY8C4547AZI-445  for a project . I have exported  the project to IAR 8.3. Now I have a probem ,when download and debug  ,it prompt flashloader error. And not be able to access timing interruption,when place a breakpoit .

      I have paid a lot of time to find out the cause .Now I get it ,but don't know why. 

     

    In i_ODUtim1ms.c ,there is one function:

   CY_ISR(Time1ms_ISR)

   {

       if (Timer_1ms_INTR_MASK_CC_MATCH == Timer_1ms_GetInterruptSourceMasked()) // Check interrupt source

       {

           Timer_1ms_ClearInterrupt(Timer_1ms_INTR_MASK_CC_MATCH); // Clear interrupt and then process Capture interrupt

           return;

        }

       Timer_1ms_ClearInterrupt(Timer_1ms_INTR_MASK_TC);       // Clear interrupt and then process Terminal Count interrupt

       i_ODUtim1ms();

   }

      I have cut the code and paste it to main.c , all the problem have solved . If  I debug the program using Psoc Creator 4.2 ,and

there is no problem .

     I think may be there  is something different in the complier ,but I can't find out it . Could you please kindly help me?

     Thanks.

0 Likes
1 Solution

Hi Ankita ,

     I am sure I  have followed all the steps. Now I have found that  if I define a dummy variable like unsigned char m=0; in  CY_ISR(Time1ms_ISR), and it works .

    I am sorry that the project is in the customer's computer , so I cann't share it to you .

    Thanks.

View solution in original post

0 Likes
4 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Hi,

Can you please try the following code snippet:

CY_ISR(Time1ms_ISR)

   {

       if (Timer_1ms_INTR_MASK_CC_MATCH == Timer_1ms_GetInterruptSourceMasked()) // Check interrupt source

       {

           Timer_1ms_ClearInterrupt(Timer_1ms_INTR_MASK_CC_MATCH); // Clear interrupt and then process Capture interrupt

          

        }

else

{

       Timer_1ms_ClearInterrupt(Timer_1ms_INTR_MASK_TC);       // Clear interrupt and then process Terminal Count interrupt

       i_ODUtim1ms();

}

   }

Basically not to use "return" in isr body, using "else" instead.

Then compile the code in Creator and export it to IAR by following the steps as given in Help section of PSoC Creator.

Thanks,

Ankita

0 Likes

Hi Ankita,

    It does not work.

0 Likes

I hope you have followed all the steps mentioned in Help Section of Creator for Exporting a PSoC4 project to IAR.

Please share the Creator project.

0 Likes

Hi Ankita ,

     I am sure I  have followed all the steps. Now I have found that  if I define a dummy variable like unsigned char m=0; in  CY_ISR(Time1ms_ISR), and it works .

    I am sorry that the project is in the customer's computer , so I cann't share it to you .

    Thanks.

0 Likes