- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your data rate relatively low with respect to the rest of code in loop,
so at first blush I thought maybe you are over writing Tx buffer. But
then I see it is a blocking call.
Looking at system tab of .cydwr file I see you have CMSIS library
checked off and a heap size of 256 bytes, stack of 1000. Maybe increase
heap size a little due to use of the library and sprintf.
Also the data buffer produced is 9 chars + a NULL to terminate string,
But Tx buffer set to 8 bytes, needs to be 10 I would think.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Everything I did and nothing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see in the terminal window baud rate detected as 110K ? I thought
the project baud rate was a lot less. If its 110K you might try a lower
baud rate.
Also look with scope at signaling, make sure its RS232 levels and relatively
clean.
Additionally look at clock accuracy in your clock chain to the UART to make
sure your accuracy will tolerate the baud rate you are shooting for.
This is for PSOC 1 but principles apply -
http://www.cypress.com/blog/psoc-hacker-blog/uart-clock-accuracy-requirement-psoc-1
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Print buffer needs to be at least 12 (forgot \n\r), so why not use 20.
I would suggest to put the line
ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
into the infinite loop, thus waiting every cycle for a valid result.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Suggested did everything and nothing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
please upload current project
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how much RAM is being used for stack and heap, (I mean it is ACTUALLY used, not being assigned for ). Any one has any idea how we can get the information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
heap size and stack size the problem is the example given in a single channel use two channels of ADC might this affect me heap size and stack sizeheap size and stack size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Heap is used by sprintf(), stack usually uncritical when >= 0x0400 as you specified.
I have currently no access to lab to check code, but I presume that the problem is on PC side. You may try (what I wanted to check) to use a different terminal program, preferrably PuTTY.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to use an ISR attached to eoc output, as that signifies when all channels
have been scanned and result registers can be read. Right now you only can be sure
one channel has completed when you invoke. You might consider stopping ADC
when the ISR occurs, then restarting it. Read notes associated with these APIs care-
fully.
ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
The ISR should stop converter, set a flag (declared as volatile). and in main() test
flag, read the results and then restart ADC.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not quite. The selected way (see datasheet)
"ADC_WAIT_FOR_RESULT
Does not return a result until the ADC conversion of all sequential channels is complete."
ensures that all channels are converted. So no isr is needed, although it could make life easier.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I stand corrected. I missed that note about all channels vs 1 channel.
cuenta1 = ADC_GetResult16(CHANNEL1);
You declared cuental as uint16, but function returns int16, you might want to
correct that.
Looks like a logic analyzer would also be useful. These are pretty cheap, work quite well,
search for this on ebay "saleae logic analyzer"
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried everything to change computer remains the same
also buy the logic analyzer as UART port to connect to verify?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My experiences with transmitting data via UART or USBUART are quite flawless. I cannot monitor something like your experiences show and I did a lot of those. So I assume that something with one of your windows drivers or your OS is not as required. (Have a look at CTS and RTS lines)
You may do a check yourself, just configure an UART Tx-Rx loopback and see that the transmission without additional hardware (except a jumper wire) works just fine. Next you can check your two-way level shifting cable.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you purchased the cheap analyzer it cannot handle RS232 levels directly
at its inputs. So place series R's in the data lines to the analyze, say 2 K ohm,
and that should protect the analyzer.
Data circuits Control circuits Voltage RS232
0 (space) Asserted +3 to +15 V 1 (mark) Deasserted -15 to -3 V
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried the CY8CKIT-50 kit was great to be a problem with my board psoc 4 pionner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried the CY8CKIT-50 kit was great to be a problem with my board psoc 4 pionner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you do not influenced bigger heap size(0x1000) and stack size(0x4000 )