From 7762e7fc16c5cf67380b44618092c2ad11c067bd Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 21 Dec 2011 15:50:06 +0000 Subject: [PATCH] Add the beginning of an STM32 CAN driver git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4209 42af7a65-404d-4744-a932-0658087f49c3 --- configs/README.txt | 9 +++++++++ configs/hymini-stm32v/README.txt | 14 ++++++++++++-- configs/stm3210e-eval/README.txt | 11 +++++++++++ configs/stm3240g-eval/README.txt | 11 +++++++++++ configs/stm3240g-eval/dhcpd/defconfig | 18 ++++++++++++++++++ configs/stm3240g-eval/nettest/defconfig | 18 ++++++++++++++++++ configs/stm3240g-eval/nsh/defconfig | 18 ++++++++++++++++++ configs/stm3240g-eval/ostest/defconfig | 18 ++++++++++++++++++ 8 files changed, 115 insertions(+), 2 deletions(-) diff --git a/configs/README.txt b/configs/README.txt index a85348babe..90302fff64 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -633,6 +633,15 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an alarm. A callback function will be executed when the alarm goes off + CAN driver + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + SPI driver CONFIG_SPI_OWNBUS - Set if there is only one active device diff --git a/configs/hymini-stm32v/README.txt b/configs/hymini-stm32v/README.txt index 016604d887..ccb3850e2e 100755 --- a/configs/hymini-stm32v/README.txt +++ b/configs/hymini-stm32v/README.txt @@ -486,8 +486,18 @@ HY-Mini specific Configuration Options 4-bit transfer mode. CONFIG_MMCSD_HAVECARDDETECT - Select if SDIO driver card detection is 100% accurate (it is on the HY-MiniSTM32V) - - + + HY-MiniSTM32V CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + HY-MiniSTM32V LCD Hardware Configuration (SSD1289 controler) CONFIG_NX_LCDDRIVER - To be defined to include LCD driver diff --git a/configs/stm3210e-eval/README.txt b/configs/stm3210e-eval/README.txt index f8868373fa..e5f2541d8e 100755 --- a/configs/stm3210e-eval/README.txt +++ b/configs/stm3210e-eval/README.txt @@ -575,6 +575,17 @@ STM3210E-EVAL-specific Configuration Options CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: 4-bit transfer mode. + STM3210E-EVAL CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + STM3210E-EVAL LCD Hardware Configuration CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" diff --git a/configs/stm3240g-eval/README.txt b/configs/stm3240g-eval/README.txt index a7e49a73a3..8813ac821f 100755 --- a/configs/stm3240g-eval/README.txt +++ b/configs/stm3240g-eval/README.txt @@ -481,6 +481,17 @@ STM3240G-EVAL-specific Configuration Options CONFIG_STM32_ETH_PTP - Precision Time Protocol (PTP). Not supported but some hooks are indicated with this condition. + STM3240G-EVAL CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + STM3240G-EVAL LCD Hardware Configuration Configurations diff --git a/configs/stm3240g-eval/dhcpd/defconfig b/configs/stm3240g-eval/dhcpd/defconfig index 3675f5b852..a0ba27c0b9 100755 --- a/configs/stm3240g-eval/dhcpd/defconfig +++ b/configs/stm3240g-eval/dhcpd/defconfig @@ -256,6 +256,24 @@ CONFIG_SSI1_DISABLE=y CONFIG_SSI_POLLWAIT=y #CONFIG_SSI_TXLIMIT=4 +# +# STM32F40xxx specific CAN device driver settings +# +# CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or +# CONFIG_STM32_CAN2 must also be defined) +# CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. +# Default: 8 +# CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. +# Default: 4 +# CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. +# CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. +# +CONFIG_CAN=n +#CONFIG_CAN_FIFOSIZE +#CONFIG_CAN_NPENDINGRTR +CONFIG_CAN1_BAUD=115200 +CONFIG_CAN2_BAUD=115200 + # # STM32F40xxx Ethernet device driver settings # diff --git a/configs/stm3240g-eval/nettest/defconfig b/configs/stm3240g-eval/nettest/defconfig index 6884ad3d7e..afcd39512c 100755 --- a/configs/stm3240g-eval/nettest/defconfig +++ b/configs/stm3240g-eval/nettest/defconfig @@ -256,6 +256,24 @@ CONFIG_SSI1_DISABLE=y CONFIG_SSI_POLLWAIT=y #CONFIG_SSI_TXLIMIT=4 +# +# STM32F40xxx specific CAN device driver settings +# +# CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or +# CONFIG_STM32_CAN2 must also be defined) +# CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. +# Default: 8 +# CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. +# Default: 4 +# CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. +# CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. +# +CONFIG_CAN=n +#CONFIG_CAN_FIFOSIZE +#CONFIG_CAN_NPENDINGRTR +CONFIG_CAN1_BAUD=115200 +CONFIG_CAN2_BAUD=115200 + # # STM32F40xxx Ethernet device driver settings # diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index 8acd5de7c3..72ab549efa 100755 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -256,6 +256,24 @@ CONFIG_SSI1_DISABLE=y CONFIG_SSI_POLLWAIT=y #CONFIG_SSI_TXLIMIT=4 +# +# STM32F40xxx specific CAN device driver settings +# +# CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or +# CONFIG_STM32_CAN2 must also be defined) +# CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. +# Default: 8 +# CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. +# Default: 4 +# CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. +# CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. +# +CONFIG_CAN=n +#CONFIG_CAN_FIFOSIZE +#CONFIG_CAN_NPENDINGRTR +CONFIG_CAN1_BAUD=115200 +CONFIG_CAN2_BAUD=115200 + # # STM32F40xxx Ethernet device driver settings # diff --git a/configs/stm3240g-eval/ostest/defconfig b/configs/stm3240g-eval/ostest/defconfig index 2b51d88c7d..e0b696dfee 100755 --- a/configs/stm3240g-eval/ostest/defconfig +++ b/configs/stm3240g-eval/ostest/defconfig @@ -256,6 +256,24 @@ CONFIG_SSI1_DISABLE=y CONFIG_SSI_POLLWAIT=y #CONFIG_SSI_TXLIMIT=4 +# +# STM32F40xxx specific CAN device driver settings +# +# CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or +# CONFIG_STM32_CAN2 must also be defined) +# CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. +# Default: 8 +# CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. +# Default: 4 +# CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. +# CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. +# +CONFIG_CAN=n +#CONFIG_CAN_FIFOSIZE +#CONFIG_CAN_NPENDINGRTR +CONFIG_CAN1_BAUD=115200 +CONFIG_CAN2_BAUD=115200 + # # STM32F40xxx Ethernet device driver settings #