작성일: 2022-05-08
DS12110, STM32H742xI/G STM32H743xI/G, https://www.st.com/resource/en/datasheet/stm32h743vi.pdf
RM0433, Reference manual(STM32H743), https://www.st.com/resource/en/reference_manual/dm00314099-stm32h742-stm32h743-753-and-stm32h750-value-line-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf
MCP25XXFD Family Reference Manual, http://ww1.microchip.com/downloads/en/DeviceDoc/MCP251XXFD-CAN-FD-Controller-Module-Family-Reference-Manual-20005678B.pdf
AN5438, FDCAN peripheral on STM32 devices, https://www.st.com/resource/en/application_note/an5348-fdcan-peripheral-on-stm32-devices-stmicroelectronics.pdf
USB ULPI(High-Speed) | FDCAN2 |
---|---|
• OTG_HS_ULPI_STP | • FDCAN2_TX |
• OTG_HS_ULPI_DIR | • FDCAN2_RX |
• OTG_HS_ULPI_NXT | |
• OTG_HS_ULPI_CK | |
• OTG_HS_ULPI_D0 | |
• OTG_HS_ULPI_D1 | |
• OTG_HS_ULPI_D2 | |
• OTG_HS_ULPI_D3 | |
• OTG_HS_ULPI_D4 | |
• OTG_HS_ULPI_D5 | |
• OTG_HS_ULPI_D6 | |
• OTG_HS_ULPI_D7 |
STM32H743에서 FDCAN2_RX는 alternate function 으로 두 군데에서 선택할 수 있으나 아래와 같이 OTG_HS_ULPI_D* 과 겹치는 문제 발생
Pin name | Alternate functions |
---|---|
PB5 | TIM17_BKIN,TIM3_CH2, HRTIM_EEV7, ITIM17_BKIN,TIM3_CH2, HRTIM_EEV7, I2C1_SMBA, SPI1_MOSI/I2S1_SDO, I2C4_SMBA, SPI3_MOSI/I2S3_SDO, SPI6_MOSI, FDCAN2_RX, OTG_HS_ULPI_D7, ETH_PPS_OUT, FMC_SDCKE1, DCMI_D10, UART5_RX,EVENTOUT |
PB12 | TIM1_BKIN, I2C2_SMBA, SPI2_NSS/I2S2_WS, DFSDM1_DATIN1, USART3_CK, FDCAN2_RX, OTG_HS_ULPI_D5, ETH_MII_TXD0/ETH_RMII_TXD0, OTG_HS_ID, TIM1_BKIN_COMP12, UART5_RX, EVENTOUT |
MICROCHIP의 MCP2518FD로 FDCAN를 대체 가능한지 검토.
위 두 컨트롤러 모두 CAN2.0B, CAN FD (ISO 11898-1:2015)를 지원하고 있음.
FDCAN
RM0433, Table 487. Rx buffer and FIFO element
RM0433, Table 488. Rx buffer and FIFO element description, R0 bits 28:0 ID[28:0]
MCP2518FD
MCP25XXFD, TABLE 7-1: RECEIVE MESSAGE OBJECT
FDCAN | MCP2518FD |
---|---|
128 filter elements(11-bit IDs) / 64 filter elements(29-bit IDs) | 32 acceptance filters |
range filter / filter for one or two dedicated IDs / classic bit mask filter | a Filter Object and a Mask Object |
Each filter element is configurable for acceptance or rejection filtering |
FDCAN
RM0433 Figure 740. Bit timing
MCP2518FD
MCP25XXFD, Figure 3-2: Partition of Bit Time
MCP25XXFD, Equation 3-1: Nominal Bit Rate/Time
MCP25XXFD, Equation 3-3: Norminal Time Quanta
MCP25XXFD, Euqation 3-5: Number of NTQ in a NBT
⇒ MCP2518FD에서는 위 값들 + NSJW 로 Oscillator tolerance condition 들을 계산하고 있어서 확인이 더 필요함
Physical organization(transceiver)
High-Speed CAN | Low-Speed CAN (Fault-Tolerant CAN ) | |
---|---|---|
ISO | ISO 11898-2 | ISO 11898-3 |
baud rate | ~ 1 Mbit/s (default: 500 kbit/s) | ~ 125 Kbit/s |
resistance | cable with a nominal impdedance of 120 ohm | each device has its own termination |
High-speed CAN signaling. ISO 11898-2
https://en.wikipedia.org/wiki/CAN_bus#/media/File:ISO11898-2.svg
Low-speed CAN signaling .ISO 11898-3
https://en.wikipedia.org/wiki/CAN_bus#/media/File:ISO11898-3_Waveform.svg
AN5348, Figure 2. Frame architecture of CAN-FD versus CAN2.0
AN5348, Table 2. Payload data length codes(bytes)
AN5348, Table 3.Main differences between CAN-FD an CAN 2.0
The CAN FD Controller module has eight modes of operation(CiCON.REQOP)
Configuration Mode
The following registers and bit fileds can only be programmed during Configuration mode:
The oscillator, FIFOs and bit time can only be configured in Configuration mode.
⇒ bit time 변경은 configuration mode 에서
Normal Modes
⇒ CAN 2.0, CAN FD를 고정하는 mode 가 존재함