I would like to detect differential sensor disconnection.
Currently, in the S1JA application we are using 4 channels (SD0:3). We want to use a maximum value of 25 mV. Each channel has a gain of 32U. --> GTotal(32) = G1(4)*G2(8) to take advantage of all the values to have more resolution.
When the sensor is disconnected I have 3V en P and 1V in N
- When SDADCCHn amplifications are (4,8), we don´t see the signal in saturation mode. SDADCn ~= 10u --> BAD
- When SDADCCHn amplifications are (1,1), we see the signal in saturation mode. SDADCn = 32767. --> GOOD
Because of this reason, I would like to follow the next routines.
I am stuck to make the next functions work due to the fact that I get loss with the framework/driver and the different cfgs of the ADC channels.Any kind of help?
I'm guessing the hardware will do what you want to do, but the framework/tool is rather a bit too simplistic for that. I ran into a similar deal with I2C channels and wanting to just change the target…
When calibrating the SDADC24, the differential input voltage must be in the range shown :-
With 3V in CHnP and 0V in CHnN, the differential input voltage will be outside the range allowed for calibration…
I'm guessing the hardware will do what you want to do, but the framework/tool is rather a bit too simplistic for that. I ran into a similar deal with I2C channels and wanting to just change the target address -- can't be done.
The problem is that all those configuration things are instantiated in FLASH, not RAM so you can't go and change config parameters and re-open the framework. There are two ways to approach this:
1) You have multiple versions of the analog systems there (named different things with your slightly different parameters). Close one and open the other when you want to change parameters. This is what I had to do just to change the target addresses of an I2C. It means that structural changes in one have to be made in the other at the same time (you have to remember to do that).
2) Edit the .c files that get created so those structures are in RAM where you can change them and then change the appropriate things in it between close and open of the same thing. To make this work you have to mark the file read only (or put it somewhere that it won't be overwritten and then change the compile sources) after you edit it. This has the problem that if you ever make a change to the structure of the thing, you have to remember what you did, and how, so you can allow the updates and then modify accordingly. It's a painful thing to do it this way in general.
First of all,
Thank you for your fast reply rjl.I tried what you proposed adding in another thread the same configuration to start and stop those configurations as you proposed. The problem is that it didn´t allow me to do it with SD_ADC framwork.Luckily, I was able to detect and partially solve the problem of the SD_ADC disconnection detection. A ticket has been send to renesas to check if the partial solution may affect the rest of the program or if it is viable to mark the solution as a final one.Best regards,Juan
With 3V in CHnP and 0V in CHnN, the differential input voltage will be outside the range allowed for calibration.
Calibration must be performed when using differential input mode, the first time after a reset (or stored calibration values loaded) :-
That´s why when we use calibration in the ssp it is not working properlly. If we deactivate it, it works without problems.-------------------------------------------------------------------The response was given by the Renesas Customer Hub.