Hi,
I am working on TJA1043TK CAN initialization. Currently don't have GPIO expander and CAN_EN and CAN_STBY connected directly to the processor.
FCAN0_EN connected with GPT0_CAPTURE
FCAN_STB connected with GPT0_COMPARE.
I have to initialize the TJA1043TK . But, IRQ is not triggering to receive the message.
Please check my configuration and let me know what I am missing
pin_mux.h
/* GPT0_CAPTURE, FCAN0_EN */
#define BOARD_INITPINS_FCAN0_EN_GPIO LSIO__GPIO0 /*!< GPIO device name: LSIO__GPIO0 */
#define BOARD_INITPINS_FCAN0_EN_GPIO_PIN 15U /*!< LSIO__GPIO1 pin index: 15 */
#define BOARD_INITPINS_FCAN0_EN_PIN_NAME GPT0_CAPTURE /*!< Pin name */
#define BOARD_INITPINS_FCAN0_EN_PIN_FUNCTION_ID SC_P_GPT0_CAPTURE /*!< Pin function id */
#define BOARD_INITPINS_FCAN0_EN_LABEL "FCAN0_EN" /*!< Label */
#define BOARD_INITPINS_FCAN0_EN_NAME "FCAN0_EN" /*!< Identifier name */
#define BOARD_INITPINS_FCAN0_EN_DIRECTION kGPIO_DigitalOutput /*!< Direction */
/* GPT0_COMPARE, FCAN0_STB */
#define BOARD_INITPINS_FCAN0_STB_GPIO LSIO__GPIO0 /*!< GPIO device name: LSIO__GPIO0 */
#define BOARD_INITPINS_FCAN0_STB_GPIO_PIN 16U /*!< LSIO__GPIO1 pin index: 16 */
#define BOARD_INITPINS_FCAN0_STB_PIN_NAME GPT0_COMPARE /*!< Pin name */
#define BOARD_INITPINS_FCAN0_STB_PIN_FUNCTION_ID SC_P_GPT0_COMPARE /*!< Pin function id */
#define BOARD_INITPINS_FCAN0_STB_LABEL "FCAN0_STB" /*!< Label */
#define BOARD_INITPINS_FCAN0_STB_NAME "FCAN0_STB" /*!< Identifier name */
#define BOARD_INITPINS_FCAN0_STB_DIRECTION kGPIO_DigitalOutput /*!< Direction */
pin_mux.c
err = sc_pad_set_all(ipc, BOARD_INITPINS_FCAN0_EN_PIN_FUNCTION_ID, 3U, SC_PAD_CONFIG_OUT_IN, SC_PAD_ISO_OFF, 0x61 ,SC_PAD_WAKEUP_OFF);
if (SC_ERR_NONE != err)
{
assert(false);
}
err = sc_pad_set_all(ipc, BOARD_INITPINS_FCAN0_STB_PIN_FUNCTION_ID, 3U, SC_PAD_CONFIG_OUT_IN, SC_PAD_ISO_OFF, 0x61 ,SC_PAD_WAKEUP_OFF);
if (SC_ERR_NONE != err)
{
assert(false);
}
Solved! Go to Solution.
Software wise this is proper only. There is hardware problem.
Software wise this is proper only. There is hardware problem.