CYBLE-416045-02 - Impossible to start Capsense

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.
gibe_285051
Level 1
Level 1
5 replies posted First like received First reply posted

Hi community,

I coded a FreeRTOS program in the CY8CKIT-062-BLE Development Board, this program handles BLE, Capsense, GPIOs, Uart and I2C.

The electrical department made a board with the CYBLE-416045-02, So on Modus Toolbox, I changed the target and rebuild.

When I loaded the code in the custom board, nothings happen as usual for the first load, So I debugged it, the code crashes at the first line of the main, the cybsp_init function. I commented on this line and the next crash was the enabling of Capsense.

   /* Initialize the device and board peripherals */

   result = cybsp_init();

   /* Board init failed. Stop program execution */

    if (result != CY_RSLT_SUCCESS)

    {

        CY_ASSERT(0);

    }

static cy_status capsense_init(void)

{

    cy_status status;

    /* CapSense interrupt configuration parameters */

    static const cy_stc_sysint_t capSense_intr_config =

    {

        .intrSrc = csd_interrupt_IRQn,

        .intrPriority = CAPSENSE_INTERRUPT_PRIORITY,

    };

    /*Initialize CapSense Data structures */

    status = Cy_CapSense_Init(&cy_capsense_context);

    if(CY_RET_SUCCESS == status)

    {

        /* Initialize CapSense interrupt */

        Cy_SysInt_Init(&capSense_intr_config, &capsense_isr);

        NVIC_ClearPendingIRQ(capSense_intr_config.intrSrc);

        NVIC_EnableIRQ(capSense_intr_config.intrSrc);

        /* Register end of scan callback */

        status = Cy_CapSense_RegisterCallback(CY_CAPSENSE_END_OF_SCAN_E,

                capsense_end_of_scan_callback, &cy_capsense_context);

        if(CY_RET_SUCCESS == status)

        {

            /* Initialize the CapSense firmware modules. */

            status = Cy_CapSense_Enable(&cy_capsense_context);

        }

    }

   

    return status;

}

To finish, I also tried to launch the program in the CY8CKIT-063-BLE and it also crashes to the enabling of Capsense (Cy_CapSense_Enable()) .

Someone tries to use the Capsense library with CYBLE-416045-02 and Modus Toolbox ?

The code is joined to the post, any suggestions can help me do not hesitate

0 Likes
1 Solution

Hi gibe_285051​,

The issue is due to the improper assignment of Cmod in the CapSense configurator. In PSoC 6, Cmod needs to be assigned to one of the pins mentioned in the PSoC 6 MCU CapSense design guide (Pg 127) document for proper functioning of CapSense. You have assigned it to 6.3 pin currently.

pastedImage_0.png

The CapSense middleware library checks if the CMOD assignment is done correctly to one of the above mentioned pins. If not, Cy_CapSense_Enable fails. After correcting the pin assignment to 7.1, there weren't any issues. Please let us know if it works at your end.

Also please be aware of the errata mentioned in the respective datasheet for restrictions on CapSense pin assignments.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

3 Replies
gibe_285051
Level 1
Level 1
5 replies posted First like received First reply posted

For the crash of  cybsp_init() , I found the issue , There is no WCO in the electrical schematic so I removed this clock in ModusToolbox and it doesn't crash anymore at this line but it's still impossible to enable the capsense.

0 Likes

Hi gibe_285051​,

The issue is due to the improper assignment of Cmod in the CapSense configurator. In PSoC 6, Cmod needs to be assigned to one of the pins mentioned in the PSoC 6 MCU CapSense design guide (Pg 127) document for proper functioning of CapSense. You have assigned it to 6.3 pin currently.

pastedImage_0.png

The CapSense middleware library checks if the CMOD assignment is done correctly to one of the above mentioned pins. If not, Cy_CapSense_Enable fails. After correcting the pin assignment to 7.1, there weren't any issues. Please let us know if it works at your end.

Also please be aware of the errata mentioned in the respective datasheet for restrictions on CapSense pin assignments.

Regards,

Bragadeesh

Regards,
Bragadeesh

Thank you very much for your help !