Hi, I’m a weird issue after porting to the AT90s8515. I have only modified portTOTAL_HEAP_SIZE ((set to 384) and portCOMPARE_MATCH_A_INTERRUPT_ENABLE (set to 0x40) from the ATmega323 port, to match the 8515 device. All seems to work well when I just have one simple task that toggles a LED every 100mS. When I add another task to flash another LED using the same code (albiet in a new function) the first task seems works at an accelerated rate and the second task appears to execute once and then halts (only debugging by the LED’s). I’m using the vTaskDelayUntil function to delay the task. All my variables are local to each function. Any idea’s? I have been
Do you have any external RAM? I don’t think the 8515 has enough internal RAM. 384 heap size is probably your problem. I suspect creating the second task is running out of ram.
I thought that may be the case but I have changed the portMINIMAL_STACK_SIZE from the original size (85) down to 30 and still the same issue. The 8515 has 512bytes Ram, a quick count means even with the Stack Size of 100 I should be able to fit three, even four tasks, if not using any global variables.
30 bytes of stack is unfortunately not enough to save the AVR context – so you will get stack corruption for sure.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.