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.

CCS/AM3358: eHRPWM examples

Part Number: AM3358


Tool/software: Code Composer Studio

I would like to use the PWM of the PRU (AM335X) in the Beaglebone black, but I can't find a good example follow, more especific a want to use eHRPWM

I need to execute the code and acess the registers  on CCS, without using the linux

Thanks in advance

  • You can look in the Starterware examples: processors.wiki.ti.com/.../StarterWare However please be aware that Starterware has been discontinued and is no longer supported by TI or on this forum.
  • I see, but looking in  PRU Software Support Package from texas I find the header file sys_pwmss_.h and since I using PRU Software Support Package I would enjoy finding I an example using this file If is possible.

    The pwm I like to create is time based. 

  • Your question is very confusing: are you asking about eHRPWM or about PRU ? They are completely unrelated

  • you are right I get that wrong, They are unrelated. How could I make the pru get acess to the pwm of am335X, therefore use the pru to enable the pwm output?

    The pwm is timebased with a fixed duty cycle. The application is to allow events  triggering in ADC conversion. 

    Do you think  is better in my situation to work with timer interruption and the enhanced gpio?

  • Hello Orlem,

    Could you tell us more about your use case? It sounds like you have an external ADC chip collecting data. What is the data collection for? Does the data need to be processed? Is your application controlling everything going to run in userspace or the kernel? Does the controlling application need access to all of the ADC data, or just to be notified when something occurs (e.g. overvoltage monitoring)?

    One possible PRU-based solution (which may or may not be the best fit for your design) is to use the PRU GPI/GPO pins to control the external ADC and receive data from it - since most PRU instructions take exactly 5ns to execute, you can time waveforms coming out of the PRU GPO exactly. The PRU can then be used to process the ADC data.

    The TI design resources for a solution like that are here.

    The firmware code loaded into the PRUs for that example is here

    I explained the timing of the PRU communication with the ADC in this post.

    Regards, 

    Nick