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.

AM2634-Q1: AM2634 SDK9.1.0.41 LIN_setSyncFields() API does write rei=

Part Number: AM2634-Q1


Hi expert,

      The LIN driver in SDK 9.1.0.41 has problem. LIN_setSyncFields() APIs set wrong bit fields.  I list correct register setting code below. Please help to review and correct in the future.

Regards

Andre

 

static inline void
LIN_setSyncFields(uint32_t base, uint16_t syncBreak, uint16_t delimiter)
{
/* Check the arguments. */
DebugP_assert(LIN_isBaseValid(base));
DebugP_assert(syncBreak < 8U);
DebugP_assert((delimiter >= 1U) && (delimiter < 5U));

/* Clear sync values and set new values */
// Andre: Bug improper register write.
// HW_WR_FIELD32_RAW((base + CSL_LIN_LINCOMP), (CSL_LIN_LINCOMP_SDEL_MASK|CSL_LIN_LINCOMP_SBREAK_MASK),
// CSL_LIN_LINCOMP_SDEL_SHIFT, (syncBreak | (delimiter - 1U)));


HW_WR_FIELD32_RAW((base + CSL_LIN_LINCOMP), CSL_LIN_LINCOMP_SDEL_MASK,
CSL_LIN_LINCOMP_SDEL_SHIFT, (delimiter - 1U));
HW_WR_FIELD32_RAW((base + CSL_LIN_LINCOMP), CSL_LIN_LINCOMP_SBREAK_MASK,
CSL_LIN_LINCOMP_SBREAK_SHIFT, syncBreak);
}