1, first CAN communication through other CAN PHY communication is normal.
2, used https://community.nxp.com/t5/S32K/S32K144EVB-Q100-UJA1169-CAN/m-p/870022#M3872中的例程.
3, Some posts mentioned that V2 voltage is off by default, now it is also on, and there is 5V output from V2 measured with a multimeter;
4, debugging has found that the status register 22H of trans has an error bit, as well as CTS =inact, after debugging now the status of 22H is also considered normal;
5、IDE version:S32DS studio for ARM
But CAN communication still can not be established, please help to see what else to debug? Or what is the problem?
This is all the code to configure the SBC:
/*! @brief User configuration structure 0 */
const sbc_int_config_t sbc_uja1169_InitConfig0 =
{
/* Regulator control register group. */
.regulatorCtr =
{
/* Regulator control register. */
.regulator =
{
.pdc = SBC_UJA_REGULATOR_PDC_HV,
.v2c = SBC_UJA_REGULATOR_V2C_N_S_S_R,
.v1rtc = SBC_UJA_REGULATOR_V1RTC_90,
},
/* Supply event capture enable register. */
.supplyEvnt =
{
.v2oe = SBC_UJA_SUPPLY_EVNT_V2OE_DIS,
.v2ue = SBC_UJA_SUPPLY_EVNT_V2UE_DIS,
.v1ue = SBC_UJA_SUPPLY_EVNT_V1UE_DIS,
},
},
/* Watchdog control register. */
.watchdog =
{
.modeControl = SBC_UJA_WTDOG_CTR_WMC_TIME,
.nominalPeriod = SBC_UJA_WTDOG_CTR_NWP_4096,
},
/* Mode control register. */
.mode = SBC_UJA_MODE_MC_NORMAL,
/* LIMP home control. */
.lhc = SBC_UJA_FAIL_SAFE_LHC_FLOAT,
/* System event capture enable registers. */
.sysEvnt =
{
.owte = SBC_UJA_SYS_EVNT_OTWE_DIS,
.spife = SBC_UJA_SYS_EVNT_SPIFE_DIS,
},
/* Lock control register. */
.lockMask = (sbc_lock_t)( SBC_UJA_LOCK_LK0C_F(0) \
| SBC_UJA_LOCK_LK1C_F(0U) \
| SBC_UJA_LOCK_LK2C_F(0U) \
| SBC_UJA_LOCK_LK3C_F(0U) \
| SBC_UJA_LOCK_LK4C_F(0U) \
| SBC_UJA_LOCK_LK5C_F(0U) \
| SBC_UJA_LOCK_LK6C_F(0U) ),
/* CAN configuration group. */
.can =
{
/* CAN control register. */
.canConf =
{
.cfdc = SBC_UJA_CAN_CFDC_DIS,
.pncok = SBC_UJA_CAN_PNCOK_DIS,
.cpnc = SBC_UJA_CAN_CPNC_DIS,
.cmc = SBC_UJA_CAN_CMC_ACMODE_DD,
},
/* Transceiver event capture enable register. */
.canTransEvnt =
{
.cbse = SBC_UJA_TRANS_EVNT_CBSE_DIS,
.cfe = SBC_UJA_TRANS_EVNT_CFE_DIS,
.cwe = SBC_UJA_TRANS_EVNT_CWE_DIS,
},
/* CAN data rate selection. */
.datRate = SBC_UJA_DAT_RATE_CDR_500KB,
/* ID registers. */
.identif = {
(sbc_identifier_t)0U,
(sbc_identifier_t)0U,
(sbc_identifier_t)0U,
(sbc_identifier_t)0U,
},
/* ID mask registers. */
.mask = {
(sbc_identif_mask_t)0U,
(sbc_identif_mask_t)0U,
(sbc_identif_mask_t)0U,
(sbc_identif_mask_t)0U,
},
/* Frame control register. */
.frame =
{
.ide = SBC_UJA_FRAME_CTR_IDE_11B,
.pndm = SBC_UJA_FRAME_CTR_PNDM_DCARE,
.dlc = (sbc_frame_ctr_dlc_t)0U,
},
/* Data mask 0 - 7 configuration. */
.dataMask = {
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
(sbc_data_mask_t)0U,
}
},
.wakePin =
{
.wpre = SBC_UJA_WAKE_EN_WPRE_EN,
.wpfe = SBC_UJA_WAKE_EN_WPFE_EN,
},
};
Attached are the status registers read.
Update, it's this device, I removed it before and didn't solder it properly, now I removed it and just shorted it, I did it, I have comms!
Hi,
good to see you found this PCB/soldering issue.
BR, Petr