HI,
I am sorry ,i am poor in English.
I want to ask a question ,How to make VS1063 to transmit encoded data via UART mode.
Thank you .
VS1063 UART
Re: VS1063 UART
Hi!
From datasheet chapter 10.7.1:
-Panu
From datasheet chapter 10.7.1:
To write to parametric_x, set SCI_WRAMADDR to the address of the parameter you want to update, then write the value to SCI_WRAM. (e.g. txUartByteSpeed is at address 0x1e2b). See chapter 10.11.If SCI_AICTRL3 bit 13 is set at encode/codec startup, UART transmission of data is initialized
with parameters taken from parametric_x.
If you want to use UART transmission, you must first write the tx configuration values, then set the AICTRL3 UART TX enable bit, and only after that start the encoding/codec mode using SCI_MODE register.
UART is configured from parametric_x.i.encoding, that part of of the parametric structure is no longer cleared at software reset.
parametric_x.i.encoding.txUartDiv = UART divider register value or 0 to use byteSpeed
parametric_x.i.encoding.txUartByteSpeed = UART byteSpeed (e.g. 11520 = 115200 bit/s)
parametric_x.i.encoding.txPauseGpio = GPIO mask for transmit flow control
-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo
Panu-Kristian Poiksalo
Re: VS1063 UART
Hi!
if set parametric_x.i.encoding.txUartDiv 0
how to set parametric_x.i.encoding.txPauseGpio?
if parametric_x.i.encoding.txUartDiv is not zero?
for example, UART Baud rate is 921600, how to set parametric_x.i.encoding.txUartDiv?
Thanks!
if set parametric_x.i.encoding.txUartDiv 0
how to set parametric_x.i.encoding.txPauseGpio?
if parametric_x.i.encoding.txUartDiv is not zero?
for example, UART Baud rate is 921600, how to set parametric_x.i.encoding.txUartDiv?
Thanks!
Re: VS1063 UART
0 is a safe value for txPauseGPIO. It means there is no flow control.
The UART divider needs to be calculated from the internal clock. Note that with the patches package the clock adder is always used in the encoding mode.
First calculate for example 5.0x clock and 921600bps:
CLKI = 12.288MHz * 5.0 = 61.44 MHz
div = CLKI / 921600 = 66.6666.. = ~ 67
bps = CLKI / 67 = 917014
So, the actual rate will be 0.5% off, but should work.
Separate the 67 into two dividers. My script says the following.
67: 1* 67= 67 1.0000 0x0043
So, write 0x0043 to txUartDiv.
The UART divider needs to be calculated from the internal clock. Note that with the patches package the clock adder is always used in the encoding mode.
First calculate for example 5.0x clock and 921600bps:
CLKI = 12.288MHz * 5.0 = 61.44 MHz
div = CLKI / 921600 = 66.6666.. = ~ 67
bps = CLKI / 67 = 917014
So, the actual rate will be 0.5% off, but should work.
Separate the 67 into two dividers. My script says the following.
67: 1* 67= 67 1.0000 0x0043
So, write 0x0043 to txUartDiv.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook