forked from nopnop2002/Arduino-STM32-CAN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ffbad5
commit 499f008
Showing
2 changed files
with
645 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# stm32f405 | ||
I used [this](https://github.com/seeers/CAN-Bus-Arduino_Core_STM32) as a reference. | ||
|
||
# Changes from the original | ||
|
||
- frame format | ||
This example support Extended frame format: with 29 identifier bits. | ||
|
||
- CAN port | ||
In this example, you can select the CAN port. | ||
|
||
- CAN1 and CAN2 | ||
In this example, you can use CAN1 and CAN2 port. | ||
|
||
|
||
# Remap CAN port | ||
|
||
CAN1_RX mapped to PA11, CAN1_TX mapped to PA12 | ||
CAN2_RX mapped to PB5 , CAN2_TX mapped to PB6 | ||
``` | ||
CANInit(CAN_1000KBPS, 0); // CAN_RX mapped to PA11, CAN_TX mapped to PA12 | ||
``` | ||
|
||
CAN1_RX mapped to PB8 , CAN1_TX mapped to PB9 (not available on 36-pin package) | ||
CAN2_RX mapped to PB12, CAN2_TX mapped to PB13(not available on 36-pin package) | ||
``` | ||
CANInit(CAN_1000KBPS, 2); // CAN_RX mapped to PB8, CAN_TX mapped to PB9 | ||
``` | ||
|
||
CAN1_RX mapped to PD0 , CAN1_TX mapped to PD1 (available on 100-pin and 144-pin package) | ||
CAN2_RX mapped to PB12, CAN2_TX mapped to PB13(not available on 36-pin package) | ||
``` | ||
CANInit(CAN_1000KBPS, 3); // CAN_RX mapped to PD0, CAN_TX mapped to PD1 | ||
``` |
Oops, something went wrong.