Skip to content

Commit 102d2f8

Browse files
authored
Merge pull request #15317 from chdelfs/master
Fix for calculating CAN timing settings for STM32
2 parents 4f156de + 9cd4854 commit 102d2f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_STM/can_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ int can_frequency(can_t *obj, int f)
333333

334334
uint32_t nominalPrescaler = 1;
335335
// !When the sample point should be lower than 50%, this must be changed to
336-
// !IS_FDCAN_DATA_TSEG2(ntq/nominalPrescaler), since
336+
// !IS_FDCAN_NOMINAL_TSEG2(ntq/nominalPrescaler), since
337337
// NTSEG2 and SJW max values are lower. For now the sample point is fix @75%
338-
while (!IS_FDCAN_DATA_TSEG1(ntq / nominalPrescaler)) {
338+
while (!IS_FDCAN_NOMINAL_TSEG1(ntq / nominalPrescaler)) {
339339
nominalPrescaler ++;
340340
if (!IS_FDCAN_NOMINAL_PRESCALER(nominalPrescaler)) {
341341
error("Could not determine good nominalPrescaler. Bad clock value\n");

0 commit comments

Comments
 (0)