This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCAN4550: GPIO1 clockout function

Part Number: TCAN4550

Hi expert,

My customer is using TCAN4550 and they meet the issue that the GPIO1 will generate a 40MHz waveform, which is exact the frequency of their external crystal, after run for some time.

and I have customer readback the Modes of Operation and Pin Configuration Registers (address = h0800), 

and found that when the 40MHz is shown in the waveform, the GPIO1_CONFIG is changed to 1.(Green is the written value)

so I just want to confirm, if the bit is set to 1, does it mean it will configure as Clock out, due to I can see from older datasheet, is has a mux to it. (although from datasheet change, i can see we delete it, still I want to know, it is a die change, or just datasheet change)

and I just check why this is happened:  

firstly, I checked the SPI config, it is mode 0.

then, I just found they will re-initial the TCAN4550 by using TI demo code's function Init_CAN(void). (www.ti.com/.../SLLC469)

Before call Init_CAN(void) , they will send a RST signal to TCAN4550, and I checked they will set a high level to 2ms, and after draw low, they will wait another 2ms. 

So I have customer to comment this Init_CAN(void) code, then the issue disappeared, or it is harder to reproduced due to we did not test so long time.

do you have any ideas on why the bit is changed ?

BR

Emma

  • Hi Emma,

    The customer should only use a GPIO1_CONFIG value of "00" or "10"The GPIO1_CONFIG register values of 0x01 and 0x11 are Reserved and should not be used.  Some reserved register bits are simply unused, and others may be used for internal or development features that are not intended for use in a customer's application.

    So I have customer to comment this Init_CAN(void) code, then the issue disappeared, or it is harder to reproduced due to we did not test so long time.

    do you have any ideas on why the bit is changed ?

    The Init_CAN(void) function is the main function in the demo code that configures all of the TCAN4550's device settings.  I would think that if you commented out this entire function, then the device would not get configured or work at all.

    The following line of code in the Init_CAN(void) function sets the GPIO1_CONFIG register value.

    devConfig.GPIO1_CONFIG = TCAN4x5x_DEV_CONFIG_GPIO1_CONFIG_GPO;      // GPIO set as GPO (Default)

    This line is part of the devConfig settings shown below for reference.

    	/* Configure the TCAN4550 Non-CAN-related functions */
    	TCAN4x5x_DEV_CONFIG devConfig = {0};                        // Remember to initialize to 0, or you'll get random garbage!
    	devConfig.SWE_DIS = 0;                                      // Keep Sleep Wake Error Enabled (it's a disable bit, not an enable)
    	devConfig.DEVICE_RESET = 0;                                 // Not requesting a software reset
    	devConfig.WD_EN = 0;                                        // Watchdog disabled
    	devConfig.nWKRQ_CONFIG = 0;                                 // Mirror INH function (default)
    	devConfig.INH_DIS = 0;                                      // INH enabled (default)
    	devConfig.GPIO1_GPO_CONFIG = TCAN4x5x_DEV_CONFIG_GPO1_MCAN_INT1;    // MCAN nINT 1 (default)
    	devConfig.FAIL_SAFE_EN = 0;                                 // Failsafe disabled (default)
    	devConfig.GPIO1_CONFIG = TCAN4x5x_DEV_CONFIG_GPIO1_CONFIG_GPO;      // GPIO set as GPO (Default)
    	devConfig.WD_ACTION = TCAN4x5x_DEV_CONFIG_WDT_ACTION_nINT;  // Watchdog set an interrupt (default)
    	devConfig.WD_BIT_RESET = 0;                                 // Don't reset the watchdog
    	devConfig.nWKRQ_VOLTAGE = 0;                                // Set nWKRQ to internal voltage rail (default)
    	devConfig.GPO2_CONFIG = TCAN4x5x_DEV_CONFIG_GPO2_NO_ACTION; // GPO2 has no behavior (default)
    	devConfig.CLK_REF = 1;                                      // Input crystal is a 40 MHz crystal (default)
    	devConfig.WAKE_CONFIG = TCAN4x5x_DEV_CONFIG_WAKE_BOTH_EDGES;// Wake pin can be triggered by either edge (default)
    	TCAN4x5x_Device_Configure(&devConfig);                      // Configure the device with the above configuration

    The TCAN4x5x_DEV_CONFIG_GPIO1_CONFIG_GPO enum is included in the TCAN4x5x_Data_Structs.h file.  The code only offers the unreserved register settings as options.

    typedef enum
    {
        TCAN4x5x_DEV_CONFIG_GPIO1_CONFIG_GPO = 0,
        TCAN4x5x_DEV_CONFIG_GPIO1_CONFIG_WATCHDOG_INPUT = 2
    } TCAN4x5x_DEV_CONFIG_GPIO1_CONFIG;
    

    Can the customer verify their code is setting this register value to 0 (default) or 2 if they are using the watchdog feature?  It should not be set to 1 or 3 because those are reserved.

    I don't know of any reason this bit's setting would change on it's own.  A noisy or poor quality SPI signal could cause SPI bits to get sampled incorrectly, but this would likely not be very repeatable and would corrupt other register values as well.

    Regards,

    Jonathan