cancel
Showing results for 
Search instead for 
Did you mean: 

Few questions about STM32 microcontrollers

KMiko.1
Associate III

Hello, I have a few questions about STM32 microcontrollers:

  1. I want to create a personalized card and use CAN, RS485, I / O, ... to connect several devices
  2. I need an HMI to control the controller (touchgfx? Or Visual studio?)
  3. I want a clear program (main program and call library)
  4. I want to update everything automatically via a C# program (under visual studio) or command lines with the windows console

So ...

  1. Where can I find a card with all my needs?
  2. What is the best thing to do to create a personalized interface? Can I exchange data with windows and C# program ?
  3. Are there any libraries where you just have to call the functions you need? For example I noticed for the HAL CAN library that there was all the configuration in the MAIN program, I would like to only have to call the READ and WRITE functions
  4. Is it possible to update the microcontroller program (and the interface if I am using touchgfx) through C# or the windows console? (I think yes with ST Link)

In the past I only used Programmable Logic Controllers, with all communications built in, so sorry if my questions are "wrong"

  Thanks everyone!

14 REPLIES 14
KMiko.1
Associate III

Because I also have to manage inputs and outputs, and in the future I will have to manage other equipment (in can, or rs485 or other)

But also, I have security (CAN data) if there is a problem I have to stop the equipment concerned, and I cannot rely on windows for that (in the event of a crash it will no longer check anything)

And why not a Raspberry Pi, with dozens of "shields", AFAIK Ardino-compatible ?

Basic price would be in the same range as an MCU board, but much more comfortable development environment.

And much larger developer community.

KMiko.1
Associate III

UPDATE : Ok so i work with the FDCAN Classic frame networking example and i begin to understand !

Paul1
Lead

Makes sense. (Consider QNX for real time PC operating system, used in some cars for just those reasons).

Ensure:

  • You enable Watchdog Timer in any MCU you use, and include a watchdog handler code to recover/reset upon a missed event.
  • Handle all "exceptions", include code to recover or reset should a fault be detected
  • On powerup/reset possibly send a shutdown to connected equipment (You can check MCU flags for Reset Reason).
  • Some equipment will have a wired fault switch, and you could put an independent Watchdog+Relay circuit to shutdown equipment if board fails.

Paul

Thank you very much for your help and your advice !

I already use the watchdog in my ATmega but for the other point this is good to know !

I work on the first CAN for the moment ! thank you !