You are here

change UART settings on the fly | Cypress Semiconductor

change UART settings on the fly

Summary: 7 Replies, Latest post by michael_1534646 on 27 Nov 2016 11:16 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
RA1981's picture
User
223 posts

Hi,

 

does anyone know if the UART settings can be changed on the fly? I think I found a way to change the baudrate, but I doesn't see a direct way to modify the number of data bits, etc.

 

Regards,

 

Ralf

hli
user_78878863's picture
User
2575 posts

You can use UART_WriteControlRegister to control some aspects of the configuration. AFAICS there is no way to control the number of data bits.

RA1981's picture
User
223 posts

Hello hli,

 

thank you for the response. Too bad that there's no way to change the basic settings. I'll check if there's a more flexible solution.

 

Regards,

 

Ralf

hli
user_78878863's picture
User
2575 posts

Provided you have enough UDBs left: create multiple UARTs, each with the appropriate bit length, and switch their pins with a MUX to the output pins.

RA1981's picture
User
223 posts

Hi Hli,

 

that would be the quick solution for proof of concept. For the end application, I want to use a more flexible UART. So I have to dig into the UART component source code and check if it can be modified.

 

Regards,

 

Ralf

hli
user_78878863's picture
User
2575 posts

Probably not - I would assume that the number of data bits affect how the UART is synthesized into hardware.

RA1981's picture
User
223 posts

That would be worst case :(

From such basic peripherals like UART, SPI, etc. I'd expect that they are run-time configurable as they are on other MCUs. My problem is that for the current project I don't know at which settings the attached device will communicate, it depends on the customer.

I'll check the UDB capabilities...

 

Regards,

 

Ralf

michael_1534646's picture
User
15 posts

You should look at PSoC® 5LP Architecture TRM document

http://www.cypress.com/documentation/technical-reference-manuals/psoc-5l...

Log in to post new comments.