Skip to content

Commit 8ac50bf

Browse files
committed
added stm32f413
1 parent 3380042 commit 8ac50bf

File tree

6 files changed

+679
-14
lines changed

6 files changed

+679
-14
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ __It doesn't work with [Arduino STM32](https://github.com/rogerclarkmelbourne/Ar
5353
- from STM32F407
5454
![STM32F405_Send](https://user-images.githubusercontent.com/6020549/80896908-45f64180-8d2e-11ea-91a3-c34fdb48725b.jpg)
5555

56+
- from STM32F413
57+
![stm32f413_transfer](https://github.com/nopnop2002/Arduino-STM32-CAN/assets/6020549/af039cca-2ad9-439d-9235-a93a1952223b)
58+
5659
- from STM32F446
5760
![stm32f446_transfer](https://user-images.githubusercontent.com/6020549/110085501-8900c580-7dd4-11eb-9fb7-311c21800719.jpg)
5861

stm32f413/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# stm32f413
2+
3+
It also works with the following STM32F4 series.
4+
- STM32F412
5+
- STM32F413
6+
7+
I used [this](https://github.com/seeers/CAN-Bus-Arduino_Core_STM32) as a reference.
8+
9+
# Changes from the original
10+
11+
- frame format
12+
This example support Extended frame format: with 29 identifier bits.
13+
14+
- CAN port
15+
In this example, you can select the CAN port.
16+
17+
- CAN1 and CAN2
18+
In this example, you can use CAN1 and CAN2 port.
19+
20+
21+
# Remap CAN port
22+
STM32F412/413 has two CAN ports.
23+
These GPIOs can be used as CAN.
24+
|CAN|RX|TX||
25+
|:-:|:-:|:-:|:-:|
26+
|CAN1|PA11|PA12||
27+
|CAN1|PB8|PB9||
28+
|CAN1|PD0|PD1||
29+
|CAN1|PG0|PG1||
30+
|CAN2|PB5|PB6||
31+
|CAN2|PB12|PB13||
32+
|CAN2|PG11|PG12||
33+
34+
CAN1_RX mapped to PA11, CAN1_TX mapped to PA12
35+
CAN2_RX mapped to PB5 , CAN2_TX mapped to PB6
36+
```
37+
CANInit(CAN_1000KBPS, 0); // CAN_RX mapped to PA11, CAN_TX mapped to PA12
38+
```
39+
40+
CAN1_RX mapped to PG0 , CAN1_TX mapped to PG1
41+
CAN2_RX mapped to PG11, CAN2_TX mapped to PG12
42+
```
43+
CANInit(CAN_1000KBPS, 1); // CAN_RX mapped to PG0 , CAN_TX mapped to PG1
44+
```
45+
46+
47+
CAN1_RX mapped to PB8 , CAN1_TX mapped to PB9
48+
CAN2_RX mapped to PB12, CAN2_TX mapped to PB13
49+
```
50+
CANInit(CAN_1000KBPS, 2); // CAN_RX mapped to PB8, CAN_TX mapped to PB9
51+
```
52+
53+
CAN1_RX mapped to PD0 , CAN1_TX mapped to PD1
54+
CAN2_RX mapped to PB12, CAN2_TX mapped to PB13
55+
```
56+
CANInit(CAN_1000KBPS, 3); // CAN_RX mapped to PD0, CAN_TX mapped to PD1
57+
```

0 commit comments

Comments
 (0)