Skip to content

Commit 8d36877

Browse files
authored
Merge pull request ARMmbed#2401 from svastm/serial_asynch_f4
[STM32F4] Add asynchronous serial
2 parents 2776dd7 + e725eb5 commit 8d36877

File tree

21 files changed

+423
-1168
lines changed

21 files changed

+423
-1168
lines changed

hal/targets.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@
746746
"inherits": ["Target"],
747747
"progen": {"target": "nucleo-f401re"},
748748
"detect_code": ["0720"],
749-
"device_has": ["ANALOGIN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
749+
"device_has": ["ANALOGIN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
750750
"release_versions": ["2", "5"]
751751
},
752752
"NUCLEO_F410RB": {
@@ -758,7 +758,7 @@
758758
"inherits": ["Target"],
759759
"progen": {"target": "nucleo-f410rb"},
760760
"detect_code": ["0740"],
761-
"device_has": ["ANALOGIN", "ANALOGOUT", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
761+
"device_has": ["ANALOGIN", "ANALOGOUT", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
762762
"release_versions": ["2", "5"]
763763
},
764764
"NUCLEO_F411RE": {
@@ -770,7 +770,7 @@
770770
"inherits": ["Target"],
771771
"progen": {"target": "nucleo-f411re"},
772772
"detect_code": ["0740"],
773-
"device_has": ["ANALOGIN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
773+
"device_has": ["ANALOGIN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
774774
"release_versions": ["2", "5"]
775775
},
776776
"ELMO_F411RE": {
@@ -793,7 +793,7 @@
793793
"extra_labels": ["STM", "STM32F4", "STM32F429", "STM32F429ZI"],
794794
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
795795
"progen": {"target": "nucleo-f429zi"},
796-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
796+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
797797
"detect_code": ["0796"],
798798
"release_versions": ["2", "5"]
799799
},
@@ -806,7 +806,7 @@
806806
"inherits": ["Target"],
807807
"progen": {"target": "nucleo-f446re"},
808808
"detect_code": ["0777"],
809-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
809+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
810810
"release_versions": ["2", "5"]
811811
},
812812
"NUCLEO_F446ZE": {
@@ -818,7 +818,7 @@
818818
"inherits": ["Target"],
819819
"progen": {"target": "nucleo-f446ze"},
820820
"detect_code": ["0778"],
821-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
821+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
822822
"release_versions": ["2"]
823823
},
824824

@@ -830,7 +830,7 @@
830830
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
831831
"inherits": ["Target"],
832832
"detect_code": ["0840"],
833-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_ASYNCH_DMA", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
833+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
834834
"release_versions": ["2", "5"]
835835
},
836836
"NUCLEO_F746ZG": {
@@ -1024,7 +1024,7 @@
10241024
"extra_labels": ["STM", "STM32F4", "STM32F429", "STM32F429ZI"],
10251025
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
10261026
"progen": {"target": "disco-f429zi"},
1027-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
1027+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
10281028
"release_versions": ["2", "5"]
10291029
},
10301030
"DISCO_F469NI": {

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_ARCH_MAX/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
};
78-
7968
struct spi_s {
8069
SPIName spi;
8170
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_B96B_F446VE/objects.h

-18
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
int index;
70-
uint32_t baudrate;
71-
uint32_t databits;
72-
uint32_t stopbits;
73-
uint32_t parity;
74-
PinName pin_tx;
75-
PinName pin_rx;
76-
#if DEVICE_SERIAL_ASYNCH
77-
uint32_t events;
78-
#endif
79-
#if DEVICE_SERIAL_FC
80-
uint32_t hw_flow_ctl;
81-
PinName pin_rts;
82-
PinName pin_cts;
83-
#endif
84-
};
85-
8668
struct spi_s {
8769
SPIName spi;
8870
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ struct analogin_s {
6060
uint8_t channel;
6161
};
6262

63-
struct serial_s {
64-
UARTName uart;
65-
int index; // Used by irq
66-
uint32_t baudrate;
67-
uint32_t databits;
68-
uint32_t stopbits;
69-
uint32_t parity;
70-
PinName pin_tx;
71-
PinName pin_rx;
72-
};
73-
7463
struct spi_s {
7564
SPIName spi;
7665
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F407VG/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
};
78-
7968
struct spi_s {
8069
SPIName spi;
8170
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
#if DEVICE_SERIAL_FC
78-
uint32_t hw_flow_ctl;
79-
PinName pin_rts;
80-
PinName pin_cts;
81-
#endif
82-
};
83-
8468
struct spi_s {
8569
SPIName spi;
8670
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F469NI/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
#if DEVICE_SERIAL_FC
78-
uint32_t hw_flow_ctl;
79-
PinName pin_rts;
80-
PinName pin_cts;
81-
#endif
82-
};
83-
8468
struct spi_s {
8569
SPIName spi;
8670
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_ELMO_F411RE/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ struct analogin_s {
6060
uint8_t channel;
6161
};
6262

63-
struct serial_s {
64-
UARTName uart;
65-
int index; // Used by irq
66-
uint32_t baudrate;
67-
uint32_t databits;
68-
uint32_t stopbits;
69-
uint32_t parity;
70-
PinName pin_tx;
71-
PinName pin_rx;
72-
};
73-
7463
struct spi_s {
7564
SPIName spi;
7665
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ struct analogin_s {
6060
uint8_t channel;
6161
};
6262

63-
struct serial_s {
64-
UARTName uart;
65-
int index; // Used by irq
66-
uint32_t baudrate;
67-
uint32_t databits;
68-
uint32_t stopbits;
69-
uint32_t parity;
70-
PinName pin_tx;
71-
PinName pin_rx;
72-
};
73-
7463
struct spi_s {
7564
SPIName spi;
7665
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F405RG/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
};
78-
7968
struct spi_s {
8069
SPIName spi;
8170
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/objects.h

-11
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ struct analogin_s {
6060
uint8_t channel;
6161
};
6262

63-
struct serial_s {
64-
UARTName uart;
65-
int index; // Used by irq
66-
uint32_t baudrate;
67-
uint32_t databits;
68-
uint32_t stopbits;
69-
uint32_t parity;
70-
PinName pin_tx;
71-
PinName pin_rx;
72-
};
73-
7463
struct spi_s {
7564
SPIName spi;
7665
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@ struct analogin_s {
6060
uint8_t channel;
6161
};
6262

63-
struct serial_s {
64-
UARTName uart;
65-
int index; // Used by irq
66-
uint32_t baudrate;
67-
uint32_t databits;
68-
uint32_t stopbits;
69-
uint32_t parity;
70-
PinName pin_tx;
71-
PinName pin_rx;
72-
#if DEVICE_SERIAL_FC
73-
uint32_t hw_flow_ctl;
74-
PinName pin_rts;
75-
PinName pin_cts;
76-
#endif
77-
};
78-
7963
struct spi_s {
8064
SPIName spi;
8165
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F410RB/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
#if DEVICE_SERIAL_FC
78-
uint32_t hw_flow_ctl;
79-
PinName pin_rts;
80-
PinName pin_cts;
81-
#endif
82-
};
83-
8468
struct spi_s {
8569
SPIName spi;
8670
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@ struct analogin_s {
6060
uint8_t channel;
6161
};
6262

63-
struct serial_s {
64-
UARTName uart;
65-
int index; // Used by irq
66-
uint32_t baudrate;
67-
uint32_t databits;
68-
uint32_t stopbits;
69-
uint32_t parity;
70-
PinName pin_tx;
71-
PinName pin_rx;
72-
#if DEVICE_SERIAL_FC
73-
uint32_t hw_flow_ctl;
74-
PinName pin_rts;
75-
PinName pin_cts;
76-
#endif
77-
};
78-
7963
struct spi_s {
8064
SPIName spi;
8165
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F429ZI/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
#if DEVICE_SERIAL_FC
78-
uint32_t hw_flow_ctl;
79-
PinName pin_rts;
80-
PinName pin_cts;
81-
#endif
82-
};
83-
8468
struct spi_s {
8569
SPIName spi;
8670
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446RE/objects.h

-16
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct serial_s {
69-
UARTName uart;
70-
int index; // Used by irq
71-
uint32_t baudrate;
72-
uint32_t databits;
73-
uint32_t stopbits;
74-
uint32_t parity;
75-
PinName pin_tx;
76-
PinName pin_rx;
77-
#if DEVICE_SERIAL_FC
78-
uint32_t hw_flow_ctl;
79-
PinName pin_rts;
80-
PinName pin_cts;
81-
#endif
82-
};
83-
8468
struct spi_s {
8569
SPIName spi;
8670
uint32_t bits;

0 commit comments

Comments
 (0)