Update TWAI driver docs and registers for esp32c3

This commit updates the documentation and register struct
of the TWAI driver for the ESP32-C3. Note that the register
fields for ESP32-S3 have also been updated.
This commit is contained in:
Darian Leung
2021-03-26 20:56:54 +08:00
parent 1f54d17503
commit 7087f80b1e
5 changed files with 13 additions and 5 deletions

View File

@@ -39,7 +39,7 @@
/*-------------------------- TWAI CAPS ---------------------------------------*/
#define SOC_TWAI_BRP_MIN 2
#define SOC_TWAI_BRP_MAX 32768
#define SOC_TWAI_BRP_MAX 16384
#define SOC_TWAI_SUPPORTS_RX_STATUS 1
/*--------------------------- SHA CAPS ---------------------------------------*/

View File

@@ -94,7 +94,8 @@ typedef volatile struct twai_dev_s {
uint32_t reserved_05; /* Address 5 */
union {
struct {
uint32_t brp: 14; /* BTR0[13:0] Baud Rate Prescaler */
uint32_t brp: 13; /* BTR0[12:0] Baud Rate Prescaler */
uint32_t reserved1: 1; /* Internal Reserved */
uint32_t sjw: 2; /* BTR0[15:14] Synchronization Jump Width*/
uint32_t reserved16: 16; /* Internal Reserved */
};

View File

@@ -19,7 +19,7 @@ extern "C" {
#endif
#define SOC_TWAI_BRP_MIN 2
#define SOC_TWAI_BRP_MAX 32768
#define SOC_TWAI_BRP_MAX 16384
#define SOC_TWAI_SUPPORTS_RX_STATUS 1

View File

@@ -94,7 +94,8 @@ typedef volatile struct twai_dev_s {
uint32_t reserved_05; /* Address 5 */
union {
struct {
uint32_t brp: 14; /* BTR0[13:0] Baud Rate Prescaler */
uint32_t brp: 13; /* BTR0[12:0] Baud Rate Prescaler */
uint32_t reserved1: 1; /* Internal Reserved */
uint32_t sjw: 2; /* BTR0[15:14] Synchronization Jump Width*/
uint32_t reserved16: 16; /* Internal Reserved */
};