Fehler #601
Von Maximilian Seesslen vor 2 Tagen aktualisiert
[[http://www.bittiming.can-wiki.info/]]
| Bit Rate | accuracy | Prescaler | Number of quante | Seg1 (Prop_Seg+Phase_Seg1) | Seg 2 | Sample Point at | Register CAN_BTR |
|500 |0.0000 |8 |16 |13 |2 |87.5 | 0x001c0007 |
|500 |0.0000 | 16 |8 |6 |1 |87.5 | 0x0005000f |
<pre><code class="cpp">
/**CAN GPIO Configuration
PA11 ------> CAN_RX
PA12 ------> CAN_TX
*/
GPIO_InitStruct.Pin = GPIO_PIN_11;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
</code></pre>
| Bit Rate | accuracy | Prescaler | Number of quante | Seg1 (Prop_Seg+Phase_Seg1) | Seg 2 | Sample Point at | Register CAN_BTR |
|500 |0.0000 |8 |16 |13 |2 |87.5 | 0x001c0007 |
|500 |0.0000 | 16 |8 |6 |1 |87.5 | 0x0005000f |
<pre><code class="cpp">
/**CAN GPIO Configuration
PA11 ------> CAN_RX
PA12 ------> CAN_TX
*/
GPIO_InitStruct.Pin = GPIO_PIN_11;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
</code></pre>