diff --git a/targets/TARGET_STM/can_api.c b/targets/TARGET_STM/can_api.c index a2f34a96df7..f3c27aae133 100644 --- a/targets/TARGET_STM/can_api.c +++ b/targets/TARGET_STM/can_api.c @@ -333,9 +333,9 @@ int can_frequency(can_t *obj, int f) uint32_t nominalPrescaler = 1; // !When the sample point should be lower than 50%, this must be changed to - // !IS_FDCAN_DATA_TSEG2(ntq/nominalPrescaler), since + // !IS_FDCAN_NOMINAL_TSEG2(ntq/nominalPrescaler), since // NTSEG2 and SJW max values are lower. For now the sample point is fix @75% - while (!IS_FDCAN_DATA_TSEG1(ntq / nominalPrescaler)) { + while (!IS_FDCAN_NOMINAL_TSEG1(ntq / nominalPrescaler)) { nominalPrescaler ++; if (!IS_FDCAN_NOMINAL_PRESCALER(nominalPrescaler)) { error("Could not determine good nominalPrescaler. Bad clock value\n");