This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: ADC hangs

Part Number: AM3352


Tool/software: Linux

Hello,

My system is working on AM3352 processor. And having 2 ADC inputs. ADC is working with internal reference. In normal condition it is working perfectly. If I apply power line EFT, at that time processor can not access ADC and gets hang. 

System is working on kernel 4.4.12.   However if I change kernel version to 3.2.0 then at that time this ADC hang issue is getting resolved and ADC does not gets hang with same board and same EFT testing setup.

Our Linux application is accessing ADC by Sysfs in one shot mode, and even when it hangs with kernel 4.4.12, we cannot access it from console manually. But in kernel 3.2.0 this is working smoothly. 

Also while in EFT, we are monitoring samples from ADC it is stable till last moment. And there is no any misbehavior in ADC in terms of count. We are using ADC driver as  a module. If we disable ADC driver then system is not getting hang. 

So what should be probable cause of this problem. 

Best Regards,

Dharit

  • The software team have been notified. They will respond here.
  • Dharit,

    Can you try your same test while running the latest version of the Processor SDK and see if the symptoms persist?

    The latest Linux Processor SDK is on kernel 4.4.41: www.ti.com/.../PROCESSOR-SDK-AM335X

    Jason Reeder
  • Hello Jason,

    I have compared ADC driver of both kernel 4.4.12 and 4.4.41. There is only one difference we have found and that is related to mutex.
    Exact change is one extra variable of "struct mutex fifo1_lock" is taken and mutex is initialized in probe function and unlocked in read function.
    Otherwise driver is same in both cases. We have also bring this change in our kernel 4.4.12 but problem is still present and ADC hangs on EFT.

    Best Regards,
    Dharit
  • Dharit,

    Would it be possible to quickly try the newest Processor SDK kernel in its entirety? I think that you pulled the biggest changes but there might have been others outside of the ti_am335x_adc.c file as well.

    Have their been any hardware changes between your v3.2 and v4.4 testing? My colleague on the hardware team does not think that software alone will be able to fix this issue. If energy from this test couples into the ADC, there is a good chance the ADC will hang and the only way to recover is power on reset.  There have been multiple E2E discussions on this topic over the past few years. This is a system related issue, where you must design your product such that energy from these transients are not coupled into the ADC.

    Jason Reeder

     

  • Hello Jason,

    Hardware is same for V3.2 and V4.4.12 in testing. PCB board is the same so there is no any change is PCB routing also. We have used internal reference for ADC. Voltage 1.8V and GND provided to ADCs are with bead BLM21PG600SN1. Here 1.8V is generating from 5V through 1.8V LDO. And 5V is generated with 12V input with DC-DC converter. 12V-->5V(through DC-DC converter) ,, 5V -->1.8V (LDO). Which type of noise can hang ADC of processor? because while giving EFT on system, we are also monitoring 12V, count is not changing too heavily. It is in range of 3000 to 3010.

    We have ported ADC driver changes from 4.4.41 to 4.4.12. After porting we found that application still gets hang in ADC, "but after hanging if we do cat then we will able to read adc count." Earlier when application hangs in ADC if we do cat then cat was also getting hang.
    So if there is any changes related to ADC in 4.4.41 than we can port entire kernel to 4.4.41. Also tell us what are the changes in 4.4.41, because it is time consuming task to port entire new SDK.
  • Noise induced issues may not produce the same results every time, so I’m not sure if the differences you see between software revisions is real. Even if the difference is very repeatable, there may be an insignificant configuration difference that creates a slightly different end result. However, the fundamental problem of the ADC locking may remain the same.

     

    I’m not sure how energy from the EFT test is coupling into the ADC and causing it to hang. Checking the DC power supply as you describe assumes energy is conducted through the power supply, but this may not be the case. Your EFT test may be radiating energy which is coupled directly to the ADC inputs or other circuits which indirectly couples current into the ADC. You will need to understand how energy is coupled from the EFT source to the ADC and make necessary changes to your product that block this path.

     

    The power supply topology you describe makes me ask a potentially unrelated question. How do you insure the 1.8 volt LDO sourcing the ADC follows the power-up sequence defined in the data sheet?

     

    Regards,

    Paul