On Thursday, September 8, 2016 at 6:40:19 AM UTC-5, TJF wrote:
>
> Hi Phil!
>
> After boot the ADC subsystem is disabled by default. You have to enable 
> the CM_WKUP_ADC_TSC_CLKCTRL register in the CONTROL MODULE before you can 
> use it:
>
> mov  r0, 0x44E004BC
> mov  r1, 2
> sbbo r1, r0, 0, 4
>
> Place this snippet after OCP enbled and before any ADC register access.
>
> Regards
>

I gave this a try, with no success.  I have found that the PRU cannot 
access the ADC registers (1) - it is some bus access conflict between the 
PRU and Linux. I had seen reference to this somewhere a long while ago, and 
a solution to it, but have been unable to find the information again. 
Trying your code snippet, adding a pre-read of address 0x44E004BC before 
writing the value 2, causes the PRU to hang, which I interpret as the PRU 
waiting for a memory access that Linux isn't allowing it to have.

For further testing, I wrote some C fragments using mmap() to get ahold of 
the ADC register space, and I was able to get that to work. I don't believe 
that is a great way to go though.

(1) I know this because I tried reading the ADC REVISION register using the 
PRU and got zero as a result.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/4bfb7669-ed45-4cac-b856-4b5592ccac19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to