Problem with CyGlobalIntEnable function, nothing executes after this..

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.
Anonymous
Not applicable

Hi,

   

I am using the cy8ckit-042-4200 prototyping kit. In my program I am using the the CyGlobalIntEnable function to enable global interrupts. However I have a problem with this function, I find that nothing gets executed after the CyGlobalIntEnable  function. The function some how freezes the program execution, after removing this everything works well.

   

However I need to enable a timer interrupt, so have to use it...

   

The project bundle is attached,

   

 

   

thanks

   

a

0 Likes
5 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

How do you know that nothing gets executed? Did you step through the code with a debugger? You can also try to toggle some pins (e.g. ones with an LED connected) to see what happpens afterwards.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Your problem is not connected to the enabling of interrupts, it is an interrupt that is probably not handled correctly. I would suggest you to try single-stepping through your handler with interrupts disabled by IDE.

   

 

   

And why do you need a bootloader component for a CY8CKIT-042 ???

   

 

   

I just found a working solution running on a PSoC4:

   

/****************************************************

   

static void InitializeTaskTick(uint32 Frequency)
{
    CySysTickStart();                                        //    Starts SysTick component

   

    CySysTickSetReload(CYDEV_BCLK__SYSCLK__HZ / Frequency);
    CySysTickSetCallback(0, SysTicks);

   

    NVIC_SetPriority (SysTickIntNo, ARTSIntPrio);
    NVIC_ClearPendingIRQ(SysTickIntNo);
    NVIC_EnableIRQ(SysTickIntNo);
}    
/****************************************************************************/

   

 

   

Bob

0 Likes
Anonymous
Not applicable

How do you know that nothing gets executed? Did you step through the code with a debugger? You can also try to toggle some pins (e.g. ones with an LED connected) to see what happpens afterwards.

   

 

   

I am using the LED on the kit to check if execution happens.

   
    

And why do you need a bootloader component for a CY8CKIT-042 ???

   
   

 

   

I program the kit using the bootloader host program. The program accepts only .cyacd file

   

 

   

thanks

   

a

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I would suggest you to disable the Bootloading component and start to develop the correctness of your program using the debugger and its facilities.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

thanks everyone for the help.

   

a

0 Likes