PSoC™ 5, 3 & 1 Forum Discussions
Hi community,
I used to see all available code examples when clicking on the link Start->Find Code Example. Also all the project that are available for download.
Since a couple of days I only see the downloaded projects and no projects available for download. What am I missing ?
There is no update available for the Creator.
Thanks for any help.
Cheers
Stefan
Show LessHello,
I encountered a strange problem regarding the heap memory - if I increase the UART transmit buffer size from 256 to 1024 bytes, the heap seems to get corrupted. The first call to malloc() returns NULL. However there's no relationship between the UART component and the heap as far as I know because the UART component doesn't use dynamic memory. I wonder how I can get this debugged.
I'm using two UARTs with redirection of printf() to UART_1 and stderr to UART_2 in the application, but the call to malloc() is done before doing any prints and the requested size is way below heap size. Here are my project settings:
SRAM used: 7601 of 65536 bytes (11,6 %). Stack: 2048 bytes. Heap: 2048 bytes.
I tried to figure out if the Tx buffer somehow is within the heap section, but that doesn't seem to be the case:
extern uint8_t __cy_heap_start;
extern uint8_t __cy_heap_end;
extern uint8_t __cy_stack;
extern uint8_t __cy_stack_limit;
extern volatile uint8 UART_1_txBuffer[UART_1_TX_BUFFER_SIZE];
extern volatile uint8 UART_2_txBuffer[UART_2_TX_BUFFER_SIZE];
int main(void) {
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
setvbuf(stdin, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
UART_1_Start();
UART_2_Start();
//doing some other initialization, etc including the 1st malloc()
printf("Heap start at %p, heap end at %p\n", &__cy_heap_start, &__cy_heap_end);
printf("Stack start at %p, stack end at %p\n", &__cy_stack, &__cy_stack_limit);
printf("UART1 Tx buffer start at %p, end at %p, size %d bytes\n", &UART_1_txBuffer, &UART_1_txBuffer[UART_1_TX_BUFFER_SIZE - 1], UART_1_TX_BUFFER_SIZE);
printf("UART2 Tx buffer start at %p, end at %p, size %d bytes\n", &UART_2_txBuffer, &UART_2_txBuffer[UART_2_TX_BUFFER_SIZE - 1], UART_2_TX_BUFFER_SIZE);
while(1);
}
This is with a TX buffer size of 256 bytes which works correctly and gives the following output:
Heap start at 0x1fff8db8, heap end at 0x20007800
Stack start at 0x20008000, stack end at 0x20007800
UART1 Tx buffer start at 0x1fff8b94, end at 0x1fff8c93, size 256 bytes
UART2 Tx buffer start at 0x1fff8cb4, end at 0x1fff8db3, size 256 bytes
The stack size equals the setting from the system design settings exactly and the linker script seems to provide all the unused RAM for the heap: 0x20007800 - 0x1FFF8DB8 = 0xEA48 => 59976 bytes.
If I increase the TX buffer size of UART_2 (stderr) to 1024 bytes, the 1st malloc() with a request for 256 bytes fails. If I left out the malloc() request, the stack/heap information is:
Heap start at 0x1fff8f98, heap end at 0x20007800
Stack start at 0x20008000, stack end at 0x20007800
UART1 Tx buffer start at 0x1fff8a70, end at 0x1fff8b6f, size 256 bytes
UART2 Tx buffer start at 0x1fff8b90, end at 0x1fff8f8f, size 1024 bytes
So, I can't see anything wrong here. There's still no overlap. I can successfully request 76 byte, anything above fails if the TX buffer size is 1024. If I reduce it to the original 256 bytes it works again. I have not checked at which Tx buffer size the original request of 256 bytes fails.
Since there's no obvious relation between the UART buffers which are simply global arrays and the heap memory I'm a bit lost on how to debug and fix this. Ideas are welcome. Currently I'm trying to setup a minimum working example project to track it down and I'll provide it if I can manage to reproduce the issue.
Regards
Show Less
Hi all,
I need a the reference design for this MCU, can you send me some docs, .dsn files etc.?
OK, looking at the I2S interface.
The I2S module has a tx/rx mode.
How would I connect a TX mode device to an RX mode device?
In the RX mode there are no clock input or frame inputs?
The documentation is not clear on this.
Show LessI am working with PSoC 5LP board (CY8CKIT-050) and would like to know how to implement MODBUS RTU (master) within PSoC 5LP.
Hi guys,
I tested the PSOC CY8C5868AXI-LP035 XTAL_XO pin(using 24MHz external crystal). The waveform seems very weird. But the board works normally.
Does anyone can tell me why? In my opinion if the oscillation is wrong, the PSOC shouldn't work. And if it works, any feature will be affected?
Thanks.
Best regards.
Zl
Show LessI've had two instances now in my design where a clock signal has ended up on the comparator output . In the first case I had a clock setup on the SOC on the ADC which was ending up on a comparator output and today I had another instance of the same kind of problem, though I haven't been able to determine which clock is present on the signal.
In my design I use the comparator to convert a 422 signal to serial and then internally run the comparator output to a UART component. In the error case, I'm receiving spurious data on the UART. I ran the comparator output to a pin and checked the input lines and the output and noted the signal.
In the first case I managed to remove the SOC signal clock and that fixed the problem but I haven't been able to fix this issue.
It looks to me like there's some conflict on the internal DSI routing but I don't have any visibility into this layer.
Has anyone else noted an issue with clock signals on the comparator output? Or is there a way to visualize internal routing (e.g. a digital netlist) to see where the issue is coming from?
Thanks,
Show Less