- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to change or enable/disable the command terminator at runtime. Is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This would be for the RX UART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by "command terminator" ?
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...and for the PSoC1, I presume
The command terminator is an EQU in the file UART_1.INC, so it cannot be changed at runtime.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In global properties for the RX8 is a flag for enable of the command buffer.
I would think, but cannot find in TRM, that a register write would handle this.
If no one else comments post a CASE to get answer -
To create a technical case at Cypress -
“Support”
“Technical Support”
“Create a Case”
You have to be registered on Cypress web site first.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana, Maybe the use of the buffer is controlled by the interrupt enable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats a question to ask in the CASE filing.
If you would not mind post back to forum what you find out.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana, What is TRM? Thanks for suggesting to open a case. I'll do that tomorrow.
Bob, PSC stands for Power System Control... I work for a power company.
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TRM = Technical Reference Manual
Here are the links to PSoC1 related
http://www.cypress.com/?id=1573&rtID=117
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably I didn't state it quite clearly, I went through the sources and found out:
In the interrupt handler when a byte is received it is compared to the command terminator
The command terminator is an assembly EQU (equate) so it caqnnot be changed (except by modifying code in flash)
Easiest way out: Wirte your own interrupt handler and disable the original one. This may sound more complicated than it is. In PSoC1 there are some hints to obey to get a handler to work, but if you'd like to go this way we are going to get you through.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In PSOC Designer if you go to "Help", "Documentation", there are Architecture TRMs
there. Note there is also a Register TRM for each family, that you have to get at cypress.com
This covers all the registers used to configure PSOC.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! You've all been so very helpful. Motivated by the discussion, I found the equate and then took a look at the interrupt handler code. I thought about writing my own handler. Maybe I could move the section that states "Place your code here" in a different section of the code. That way I could add my modifications without having to re-write (copy-paste) the whole thing. I suppose that notice is there so that it preserves the user modifications when the project is re-generated. I suppose that won't work because the modified code will end up in a different section of the regenerated code.
I want to overlay modbus protocol on top the UI that I developed. I was going to implement Modbus RTU which requires binary transmissioin. That is why I wanted to diable the terminating character. Instead, now I think I will implement ASCII modbus. ASCII Modbus commands terminate with CRLF so it will be compatible with the UI. If I do need binary transmission then it looks like my easy option is to disable the interrupt and poll for new characters to arrive. My challenge will be to read them as fast or faster than they arrive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you open a CASE on this, I am curious to know if this
can still be done by register writes. If you did not then I will.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana- I think Bob's reply sums it up. Since it's an EQU then that parameter is hard-coded in the flash. One would have to know where the value(s) appear in flash and then re-write them. I think this would require a block write. This yields a 'find another way' option which is: Find a way to use utilize the terminator ; Don't use the buffer; Re-write the interrupt routine.
I did not open a case and won't be in a position to do so for a few days. If you can and will, I'd appreciate it. Please post the response.
-Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CASE filed, I will update when answer comes in.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bobs answer confirmed, from tech support -
Hi Dana,
Enabling of RxCmdBuffer does not involve a register,It uses a constant definition as given below and hence it cannot be changed at run time.
RX8_1_RXBUF_ENABLE: equ 1 //Enabling Command Buffer
RX8_1_CMD_TERM: equ dh //Command Terminator
You can find this in inc file of Rx8
Please let me know if you need more details/have further queries.
Best Regards
Sujay
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did it really take 8 days to get an answer? It has been much faster before.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Dana, We better stick with Bob! He beats 8 days anytime. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana's request for a MyCase was not a bad try: Sometimes some users request a similar change and sometimes Cypress has got a hand-wovwen solution, workaround or a qnd (Quick 'n Dirty) approach already out-of-the shelf. I presume the long delay had to do with some exhibitions taking place at that time binding a lot of manpower.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The underlying reason CASE filed is so much of the PSOC architecture
has a foundation of registers to configure the HW, so it was just to confirm
there was no register available for the termination problem. Also the
documentation, like TRM, is not perfect, kind of like finding buried cables
and pipes in a city. There are docs, drawings, but they are imperfect at best.
Kind of a cross check,. Eioght days is an abnormal response time, overnight more
typical for Cypress tech CASE response time.
Regards, Dana.