Mercurial > nand-ecoscentric
comparison packages/devs/can/arm/lpc2xxx/current/include/can_lpc2xxx_baudrates.h @ 3345:b06697684f0a
* src/can_accfilt_lpc2xxx.c, src/can_lpc2xxx.c: Fix a compile issue of
the lpc2xxx driver that only occurs if support for extended 29-bit CAN
identifiers is enabled and support for message filtering is disabled.
[ Bugzilla 1001901 ]
* includes/can_lpc2xxx_baudrates.h: Added baudrate table for CAN clock
of 14.745600 MHz. [ Bugzilla 1001900 ]
| author | sergeig |
|---|---|
| date | Wed, 11 Sep 2013 21:00:16 +0000 |
| parents | 74dbf4c3f2e1 |
| children |
comparison
equal
deleted
inserted
replaced
| 3344:1053b0d2490c | 3345:b06697684f0a |
|---|---|
| 183 CAN_BR_TBL_ENTRY( 0, 0, 0, 0, 0), // Autobaud - not supported | 183 CAN_BR_TBL_ENTRY( 0, 0, 0, 0, 0), // Autobaud - not supported |
| 184 }; | 184 }; |
| 185 #define HAL_LPC2XXX_BAUD_TBL_DEFINED 1 | 185 #define HAL_LPC2XXX_BAUD_TBL_DEFINED 1 |
| 186 #endif // CYGNUM_HAL_ARM_LPC2XXX_CAN_CLK == 12000000 | 186 #endif // CYGNUM_HAL_ARM_LPC2XXX_CAN_CLK == 12000000 |
| 187 | 187 |
| 188 #if CYGNUM_HAL_ARM_LPC2XXX_CAN_CLK == 14745600 | |
| 189 #warning "You can't get exactly the desired CAN bus speeds with the specified CAN clock of 14.7456 MHz" | |
| 190 // | |
| 191 // Table with register values for baudrates at peripheral clock of 14.7456 MHz | |
| 192 // The clock of 14.7456 MHz is not suited for a good CAN bitrate timing because | |
| 193 // you can't get exactly the desired CAN bus speed with the specified CAN | |
| 194 // clock frequency. Be sure to check the error values behind the table entries. | |
| 195 // Settings leading to speed deviations of more than 1.5% should be discarded. | |
| 196 // | |
| 197 static const cyg_uint32 lpc2xxx_br_tbl[] = | |
| 198 { | |
| 199 //----------brp tseg1 tseg2 sjw sam ------------ | |
| 200 CAN_BR_TBL_ENTRY(58, 20, 2, 0, 1), // 10 kbaud - Timing Error 0.030% | |
| 201 CAN_BR_TBL_ENTRY(66, 8, 0, 0, 1), // 20 kbaud - Timing Error -0.038% | |
| 202 CAN_BR_TBL_ENTRY(13, 17, 1, 0, 1), // 50 kbaud - Timing Error -0.310% | |
| 203 CAN_BR_TBL_ENTRY( 6, 17, 1, 0, 1), // 100 kbaud - Timing Error -0.310% | |
| 204 CAN_BR_TBL_ENTRY(12, 6, 0, 0, 1), // 125 kbaud - Timing Error -0.825% | |
| 205 CAN_BR_TBL_ENTRY( 5, 7, 0, 0, 1), // 250 kbaud - Timing Error 1.696% | |
| 206 CAN_BR_TBL_ENTRY( 2, 7, 0, 0, 0), // 500 kbaud - Timing Error 1.696% | |
| 207 CAN_BR_TBL_ENTRY( 1, 6, 0, 0, 0), // 800 kbaud - Timing Error -2.4% | |
| 208 CAN_BR_TBL_ENTRY( 0, 11, 1, 0, 0), // 1000 kbaud - Timing Error 1.696% | |
| 209 CAN_BR_TBL_ENTRY( 0, 0, 0, 0, 0), // Autobaud - not supported | |
| 210 }; | |
| 211 #define HAL_LPC2XXX_BAUD_TBL_DEFINED 1 | |
| 212 #endif // CYGNUM_HAL_ARM_LPC2XXX_CAN_CLK == 14745600 | |
| 213 | |
| 188 | 214 |
| 189 //========================================================================== | 215 //========================================================================== |
| 190 // BIT TIMING MACRO | 216 // BIT TIMING MACRO |
| 191 //========================================================================== | 217 //========================================================================== |
| 192 // | 218 // |
