Other Parts Discussed in Thread: MSPM0G3507, , SN65HVD230, SYSCONFIG
Tool/software:
Hi,
I am using LP-MSPM0G3507 development kit. And i create a new example project name of mcan_single_message_tx_LP_MSPM0G3507_nortos_gss.
This project doing basicly write a can message in every while loop. I did debug and i saw the code working on while loop so i think it should be send message.
After that, i decided to use osiloscope. I connected the PA12 MCAN0 Tx pin and i saw this;
I am also using SN65HVD230 canbus transceiver. And there is CANH meas;
This is my currently code i am using. I closed the FD mode.
#include "ti_msp_dl_config.h" int main(void) { DL_MCAN_TxBufElement txMsg; SYSCFG_DL_init(); txMsg.id = ((uint32_t)(0x4)) << 18U; txMsg.rtr = 0U; txMsg.xtd = 0U; txMsg.esi = 0U; txMsg.dlc = 1U; txMsg.brs = 0U; txMsg.fdf = 0U; txMsg.efc = 1U; txMsg.mm = 0xAAU; txMsg.data[0] = LED_STATUS_ON; while (DL_MCAN_OPERATION_MODE_NORMAL != DL_MCAN_getOpMode(MCAN0_INST)); while (1) { DL_MCAN_writeMsgRam(MCAN0_INST, DL_MCAN_MEM_TYPE_BUF, 0U, &txMsg); DL_MCAN_TXBufAddReq(MCAN0_INST, 0U); for (volatile int i = 0; i < 100000; i++); // gecikme döngüsü } }
If anyone could help I would be very happy.
Best regards.