Forums - Changing or swapping PIOs during PWM

2 posts / 0 new
Last post
Changing or swapping PIOs during PWM
glenn1
Join Date: 2 Sep 16
Posts: 4
Posted: Fri, 2016-10-28 12:34

Good afternoon,

I am having some issues changing PWM functionality between PIOs.  When the higher PIOs are used (9, 10, 11) I have no issues.  However, when I attempt to use some of the lower PIOs (3 and 4) they do not work.  Ideally I could look through the registers to determine what is happening, but I can't seem to find any documentation of the registers inside the CSR1010.  I found another post stating that the register documentation is not available.  Does anyone know if that is a true statement?  I find it hard to believe that anyone can develop a quality product with that information missing.

I started looking through the source code and found a few interesting lines.  In the PioFastPwmSetWidth function of the mesh light code it sets a few values based on a passed PIO number.  First it sets the bright width (8 bits) at a set address plus an offset for the register number.  Then it increments the address by 4 and sets the dull width (8 bits) in the same manner.  With 16-bit registers this means that there are 16 * 4 / 8 = 8 PIOs in that address space.  However, there are 12 PIOs.  Since it is the higher PIO numbers that work, the write of the bright width is occurring in the register area that appears to be for the dull width of the lower PIOs.  How is that possible?

The above is my interpretation of the code.  However, that function has magic numbers, strangely named variables and no comments which severaly affect the readability.

Any help would be greatly appreciated especially if it is in the form of a register map of this part.

Glenn

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Sat, 2016-10-29 10:11

Glenn,

The code you see on CSR mesh light is NOT PWM. its a code to call the inner 8051 asm. 

Look for file *.asm to learn. 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.