2018-02-25 07:14 PM
Environment:
Windows10 (x64)
Matlab R2017a
STM32-MAT/TARGET-v4.4.2
STM32CubeMX-v4.0
STM32Cube MCU Package for STM32F0 Series -v1.9.0
STM32Cube MCU Package for STM32F3 Series -v1.9.0
SW4STM32-v2.4
TrueSTUDIO-v9.0.0
If you use only one of the UARTs (USART1, USART2, USART3, USART4, USART5), there is no problem!
If more than one USART interface is used (in our example we use everything from USART1 to USART5), the generator does not insert line in the file <project_name>_USART.c:
/* USART2 Receive data buffer index*/
uint16_t G_USART2_Rx_idx;
/* USART3 Receive data buffer index*/
uint16_t G_USART3_Rx_idx;
/* USART4 Receive data buffer index*/
uint16_t G_USART4_Rx_idx;
/* USART5 Receive data buffer index*/
uint16_t G_USART5_Rx_idx;
�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
in the file <project_name>_USART.h
void USART2_CopyDataFcn (uint8_t*, uint16_t , struct USART_TxDataLinkTypeDef* );
void USART2_SendDataFcn (struct USART_TxDataLinkTypeDef* );
void USART3_CopyDataFcn (uint8_t*, uint16_t , struct USART_TxDataLinkTypeDef* );
void USART3_SendDataFcn (struct USART_TxDataLinkTypeDef* );
void USART4_CopyDataFcn (uint8_t*, uint16_t , struct USART_TxDataLinkTypeDef* );
void USART4_SendDataFcn (struct USART_TxDataLinkTypeDef* );
void USART5_CopyDataFcn (uint8_t*, uint16_t , struct USART_TxDataLinkTypeDef* );
void USART5_SendDataFcn (struct USART_TxDataLinkTypeDef* );
�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
...
/* USART2 Receive data buffer index*/
extern uint16_t G_USART2_Rx_idx;
/* USART3 Receive data buffer index*/
extern uint16_t G_USART3_Rx_idx;
/* USART4 Receive data buffer index*/
extern uint16_t G_USART4_Rx_idx;
/* USART5 Receive data buffer index*/
extern uint16_t G_USART5_Rx_idx;
�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
#simulink #stm32-mat/target-matlab
2018-02-26 03:52 AM
the generator
What 'generator' ?
2018-02-26 04:35 AM
STM32-MAT/TARGET
2018-02-26 04:58 AM
http://www.st.com/en/development-tools/stm32-mat-target.html
2018-02-26 05:45 AM
So is that an ST thing, or a Matlab thing?