Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Change Parity #8

Open
digitalentropy opened this issue Mar 20, 2015 · 2 comments
Open

Unable to Change Parity #8

digitalentropy opened this issue Mar 20, 2015 · 2 comments

Comments

@digitalentropy
Copy link

Biscuit does not appear to expose any characteristic for enabling and changing the UART parity bit from the default of none.

According to the TI CC2240 User Guide / Datasheet this should be possible but the code is commented so poorly I cannot find where Biscuit even sets the UxUCR register so I could at least make a custom firmware for it.

All of my target devices are hard-coded for even parity so I have to find a firmware-level solution.

@digitalentropy
Copy link
Author

I was finally able to enable 9E1 by adding "U0UCR |= 0x38;" to the serial initialization routines in biscuit.c, however this is a really dirty hack.

I tried to create a new "Parity" characteristic to make the firmware much more flexible and configurable in-field, but I only got partway through before I realized I was in over my head. The code and variables are spread out over so many files I am having trouble keeping it all in order.

Any guidance for creating a new "parity" characteristic in Biscuit would be much appreciated.

@tfadelu
Copy link

tfadelu commented Mar 23, 2015

You can add the "Parity" characteristic to the TXRX profile. The main files to change for this are Profiles/TXRX/txrxservice.*. Use the baudrate or tx_power charateristic as a template.

In biscuit.c, add an else if clause to the if statement in the txrxServiceChangeCB function (again similar to the baudrate one). You can set U0UCR in that else if clause.

Does this help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants