chrishu 发表于 2024-7-1 11:03 感谢老师指点! |
{ // CANFD_CLk = 200M psCanfd->NBTP = (3 << 25) + // NSJW = 3+1 =4 CLK (10 << 16) + // NBRP = 0+10 =10 // prescaler = 10 (13 << 8) + // NTSG1 = 13+1 =14 CLK (5 - 1) ; // NTSG2 = 5 CLK // One bit = 1+14+5 = 20 CLK // Date rate is configured as following. If CAN frame, following code is void psCanfd->DBTP = ((4 - 1) << 16) + // DBRP = 4 prescaler ((17 - 1) << 8) + // DTSG1 = 17 CLK ((3 - 1) << 4) + // DTSG2 = 3 CLK // One bit = 17+3 = 20 CLK (3 - 1) ; // DSJW = 3 CLK 感觉写的稀里糊涂的? |