« first day (4913 days earlier)      last day (72 days later) » 

12:39 PM
Hello @Lundin, I saw your reply to my question. I believe you totally understood what I am going for, so now I would like to ask you if it would be possibe for you to share some resources on where I can learn more about each of the topics you mentioned.
First I believe there should be the bootloader mode, so as I understand it, I would like to connect the PC to the board (let's say via CAN for argument's sake) and be able to trigger the configuration mode.
If that is possible, where could I look for more info about it?
 
@DanielGil Hey there. "Bootloaders" is indeed a good topic to study and many modern MCU have some manner of bootloader support built-in. Basically a bootloader is just some alternative firmware which lets you program the actual firmware through some non-convensional means like UART instead of JTAG/SWD. But the same techniques can be used for writing programs that update non-volatile memory - not necessarily done in a separate firmware but from the same one as your main program is using.
There will be app notes from ST (or whatever brand you fancy) so that's a good start.
@DanielGil And since this sounds like an automotive application of some sort you should probably go for CAN indeed.
 
12:57 PM
@Lundin Thanks, I will start by taking a look at that. As far as I have seen you're pretty active around here so I could swing by sometime later to ask for advice on how to follow up, right?
 
@DanielGil Sure thing :) What kind of application are you making, more specifically, if I may ask?
 
@Lundin Thanks a lot. Sure, the application is meant to control a hydraulic power pack (three phase motor) and some directional valves for controlling hydraulic cylinders. We are currently using a commercial ECU for a bigger version of this but it would be way too oversized for this "lite" version
 
@DanielGil So you are using something from Danfoss, Parker, Rexroth etc but want something better and cheaper? I've worked a lot with very similar applications, mainly radio remotes for controlling hydraulic applications.
 
@Lundin Yes, certainly cheaper is better but also having full control of the design allows for better compatibility with the products we already develop
 
@DanielGil Ok well depending on how much stuff you need to save, a plain STM32 MCU might be suitable or it might not. I'd advise to start looking at parts with built-in EEPROM/data flash since that makes everything so much easier.
It is possible to also write data to plain code flash, but that's always a big pain in the neck. You might be forced to run the code from RAM since code can't run from the flash bank being programmed etc. Minimum erase size for the segments might be gigantic and so on.
 
1:12 PM
@Lundin Mainly I would need to store whether an output is ON/OFF or proportional (along with the PWM parameters) and mainly wether to activate or not certain IOs
Basically like one would do with an ECU like rusefi or speeduino but for hydraulics rather than engines.
I suppose using external flash (communicating via SPI or I2C) to store that info and then having the mcu read it when booting up to make the configuration would be an option, am I correct?
 
@DanielGil Yep, I've done a lot of stuff like that. Valve type, start current, end current, dither frequency, configure it different per direction etc etc. Also developed modes that let you set the currents while running the valve live, which is handy, since they tend to be individuals.
@DanielGil External memories is a big no-no in industrial/automotive - it's a last resort. Unless you need to physically remove/replace the configuration.
 
@Lundin so what is a more suitable approach for that? Using the mcu internal flash memory?
 
@DanielGil Yep and you probably don't need to store more than a couple of kb at most, so there will be plenty of MCUs that fit the bill.
STM32L0 series have up to 6kb eeprom for example. I've used that one for a similar applicaiton.
 
1:30 PM
That's very useful information. Thank you so much.
I'll start looking at the stuff you mentioned.
See you around :)
 

« first day (4913 days earlier)      last day (72 days later) »