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

Legacy microcontrollers Forum Discussions

user_3764331
Level 1
Level 1
First reply posted First question asked First like given

Greetings...

I am using the Traveo S6J337CJ microcontroller. In CAN the data is getting pushed out to the CAN transceiver IC.

It stays the while loop "while ( 0 != (pstcCanFD->unTXBRP.u32Register & 0x00000001 )) /* Check the TRP0 */"

Can anyone help me to solve this issue.

I am using the standard libraries which is provided by the supplier. "canfd.c" ,  "canfd.h" , "canfd_generated.c"

Not coming out of this while loop

    /* Check whether Tx buffer is empty or not */

    while ( 0 != (pstcCanFD->unTXBRP.u32Register & 0x00000001 )) /* Check the TRP0 */

    {

        if(pstcCanFD->unCCCR.stcField.u1INIT == 1)

        {

            return ErrorOperationInProgress ;

        }

    }

My pin configurations:

    /* PORT - port pin configuration */

    stc_port_pin_config_t stc_port_pin_config331 = {

                                                     .enOutputFunction      = PortOutputResourceF,

                                                     .enOutputDrive         = PortOutputDriveA,

                                                     .enPullResistor        = PortPullResistorNone,

                                                     .enInputLevel          = PortInputLevelCmosA,

                                                     .bInputEnable          = FALSE,

                                                     .bNoiseFilterEnable    = TRUE,

                                                     .enGpioDirection       = PortGpioOutput,

                                                     .enGpioInitOutputLevel = PortGpioHigh

                                                                                              };

    Port_SetPinConfig( 3, 31, &stc_port_pin_config331 );

  

    stc_port_pin_config_t stc_port_pin_config330 = { .enOutputFunction      = PortOutputResourceGPIO,

                                                 .enOutputDrive         = PortOutputDriveA,

                                                 .enPullResistor        = PortPullResistorNone,

                                                 .enInputLevel          = PortInputLevelCmosA,

                                                 .bInputEnable          = TRUE,

                                                 .bNoiseFilterEnable    = FALSE,

                                                 .enGpioDirection       = PortGpioInput,

                                                 .enGpioInitOutputLevel = PortGpioLow};

    Port_SetPinConfig( 3, 30, &stc_port_pin_config330 );

0 Likes
1 Solution
HongyanW_86
Moderator
Moderator
Moderator
100 solutions authored 100 replies posted 50 solutions authored

For input pin, you also need to configure RIC_RESIN register to select the right port input. Please kindly work with local Cypress FAE to debug your issue.

Best regards,

Amy Wang

View solution in original post

1 Reply
HongyanW_86
Moderator
Moderator
Moderator
100 solutions authored 100 replies posted 50 solutions authored

For input pin, you also need to configure RIC_RESIN register to select the right port input. Please kindly work with local Cypress FAE to debug your issue.

Best regards,

Amy Wang