Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] [PSoC 5][FreeRTOS] [LCD 128x64] Program Run fine in CY8CKIT-050 but fails in Hardware

Status
Not open for further replies.

dhruv_electro

Advanced Member level 4
Joined
Dec 17, 2010
Messages
118
Helped
9
Reputation
18
Reaction score
8
Trophy points
1,298
Location
India
Activity points
2,378
[ PSoC Creator ] [ FreeRTOS ] [ PSoC 5 CY8C5868AXI-LP035 ] [ GLCD 128x64 ]

Hi there,

I am facing weird problem with my Application on PSoC 5 based hardware. This application is based on FreeRTOS, and application contains 128×64 kind of monochromatic LCD (Graphical LCD), having controller like ks0107.

The problem is that if we run this program with the PIN used for CY8CKIT-050, it runs smoothly and complete every task as desired with no problem at all. But if we only change the MCU PINs as used in our Hardware and program the Hardware MCU with same program, application runs to certain point and then hang. We tried debug mode and found out that after running for some time application goes to :
Code:
CY_ISR(IntDefaultHandler)
{

    while(1)
    {
        /***********************************************************************
        * We must not get here. If we do, a serious problem occurs, so go
        * into an infinite loop.
        ***********************************************************************/
    }
}
which is in Cm3Start.c. And at this point application stays in hanged state.

Here please note that this only happens if we used the same program in our Hardware. But if we use it in Kit (CY8CKIT-050), it runs completely fine without any fault.

We would like to also share that we have used FreeRTOS prior to this application, and we have successfully built applications with FreeRTOS.

Attaching:
View attachment 1. Application program for CY8CKIT-050.zip (PSoC Creator workspace)
View attachment 2. Application program for our Hardware.zip (PSoC Creator workspace) (Only with different PIN usage)

Call Stack window screen shot where problem occurs:
1. Call Stack 1.jpg
2. Call Stack 2.jpg

PS: This discussion is going on in parallel at
1. Cypress Community Forum
2. FreeRTOS Forum
 

Finally found the cause of the problem.

NVIC_HARD_FAULT_STATUS : Hard Fault Status Register : Address = 0xe000ed2c

This register has value 0x40000000, which means:

Hard Fault activated because a Configurable Fault was received and cannot activate because of priority or because the Configurable Fault is disabled. The Hard Fault handler then has to read the other fault status registers to determine cause.

NVIC_USAGE_FAULT_STATUS : Usage Fault Status Register : Address = 0xe000ed2a

This register has value 0x0001, which means:

UNDEFINSTR : The UNDEFINSTR flag is set when the processor attempts to execute an undefined instruction. This is an instruction that the processor cannot decode. The return PC points to the undefined instruction.

Now what this means? I cannot find the details about why this is happened and how to resolve. Please help me here.
 

We have replaced the MCU with fresh chip, and application is running fine. So we concluded that there must be some problem in MCU. As of now we are going ahead with this.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top