AnsweredAssumed Answered

STM32-MAT/TARGET. Tons Of Bugs

Question asked by Dima Sagalov on Feb 26, 2018
Latest reply on Feb 27, 2018 by Aimagin Co., Ltd.

Environment:

Windows10 (x64)

Matlab R2017a

STM32-MAT/TARGET-v4.4.2

STM32CubeMX-v4.24.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

 

The last 2 weeks had to work very tightly with the package STM32-MAT/TARGET. For my first acquaintance - too many mistakes. It became terrible to describe them all - I will kill a lot of time. But, nevertheless, I decided to do it. It will be useful for everyone!

 

My main conclusion, which I could have voiced - the package is very interesting, but the number of errors exceeds the limit. Most likely, the main reason for this is a weak coverage of tests, both through a series of microcontrollers, and through various IDEs. It seems that the developers focused on STM32F4. This is evident from the way the package works with ADC for STM32F0, for example - it does not work with it at all, completely ignores the ADC outputs in the Simulink model (the reason I will put in a separate post on ADC).

 

If the tests that are present in the STM32-MAT\STM32\STM32demos\Test directory – are all tests, then this is definitely not enough!

 

I'm sure (at least, I hope so) that developers spend a lot of time on improving this product. But with the forces of the community - it would happen faster and more productive! The end user would not have to wait half a year until the next release, when the project needs to be handed over to the customer here and now, but there is a critical error in the generator! The community could also adapt the package for Linux, especially since it is partially compatible with it.

 

Errors that I found, I'll explain in separate posts - for one post there are too many of them!

Here I only list them in the order in which they are viewed:

- Incorrect generation of projects for SW4STM32 and TrueSTUDIO (I will not tell you about other IDEs - I did not check it)

- Hardware error during SPI operation (jumping over NULL pointers)

- stopping the slave SPI after each transmission, if only the SPI-slave is defined in the system.

- If there are more than 1 USART in the system, for the first USART all the variables and functions are generated correctly, for all subsequent ones - only partially.

- If several USARTs have one common interrupt, the Cube generates the code for USART operation in the interrupt mode, and STM32-MAT/TARGET supplements this code for USART operation in the polling mode - the porridge turns out.

- ADC. Ohhhh .... This thing just killed me! I'm tired of fighting with it! Actually, after that I already spat, and decided to write about all this disgrace!

 

Perhaps not all of what I will write about is a mistake! It is possible that I myself do not understand something. Then I beg your pardon! Perhaps some of the problems have already been described by someone sometime. According to the ADC, I saw two posts ... «ADC does not work!… Oh, sorry, It works!…» On STM32F0, it definitely does not work!

Outcomes