macsaif

STM32 F4 AIN problem

7 posts in this topic

I am using the STM32 core with NG. I am starting to have problem that sometimes the AIN on the STM board stopping to respond. When it stopped to work I have connected the notebook to check what can be the reason (SW or HW). I have checked the parameters of AIN with the show id AIN:1. In both cases (the AIN is working and AIN is not working) all the parameters are the same only the Value parameter is different (when it is not working the value is 0, if it works, tha value is changing delending on the input). One important thing:

When the AIN stops to work, the standard restart does not help (reset from the MIOS studio)  When I am switching off the whole controller for few seconds the AIN mostly starts to work. 

Any idea? 

Frank

Share this post


Link to post
Share on other sites

F1 or F4 Core? AIN (MCU pins) or AINSER8 or AINSER64? I presume MCU.

Quote

(the AIN is working and AIN is not working)

??

What build version of _NG are you running?

Share this post


Link to post
Share on other sites

F4 core and AIN (MCU). 

There is also AINSER64 but this is working. 

Share this post


Link to post
Share on other sites

Sorry, I see F4 in the title now. What version of _NG? If it's a recent version try an old one and vice versa.

Could be a software bug.

From a hardware perspective it might be that your analogue voltages are out of range? I.e., greater than 3V? If the MCU freezes it might have run out of memory and needs a hard reset. But reset from MIOS Studio typically doesn't work especially on Windows, or at least a restart of MIOS Studio is required.

Personally I don't see the merit in using AINSER and AIN (MCU). The offboard ADCs are much better with far less jitter than the onboard ones.

Share this post


Link to post
Share on other sites

Thabk for reply. 

Few answers:

1. The MPU doue not freeze because all other functions are running. 

2. These AINs are working in switch mode, so they should be enough for that task. 

3. There can be problem with the voltage of the input signal, because I am using th source which is coming from another STM32 board which is running MBKB. But in the last 2 years I had no any problem with it. 

4. I am using the last (I think not released) version of MBNG which is modified by TK. (sysex handling as text in NGR, and modified Loadsnapshot which is not forwarding the values). But I have not recognized these problems earlier. The modification has been done approx. 2 weeks ago. 

Frank

Share this post


Link to post
Share on other sites

I've reached the end of where I could offer help. If it was working before, switch back to a previous firmware version? I think TK. modified _NG to accommodate mixtures of AIN ports as inputs and outputs, so maybe something to do with that!

Best of luck,
Andy

Share this post


Link to post
Share on other sites

The modification was based on my request to add Load Snopshot without triggering. 

I will try to add some resistors to the switches to lower little bit a voltage to prevent overvoltage on AINs. 

Frank

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now