FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2017 Threads] PIC32MZ UART RX crashes prvIdleTaskPosted by arhancock on March 28, 2017 I am porting our application form a custom PIC32MX board to a new custom PIC32MZ board. I am using Microchip's Harmony 2.01b and FreeRTOS 9.x. I have two uarts configured in the project (UART 1 and 3). Both are transmitting okay. When I receive a character form UART 3, I get a general exception at an address that is in the middle of prvIdleTask.
Being failry new to Harmony and FreeRTOS, I am at a loss at to how to debug this. I have tried increasing various stack sizes - no difference, and different Harmony usart models (Byte mode and Buffer queue mode) - not difference.
Any ideas?
PIC32MZ UART RX crashes prvIdleTaskPosted by rtel on March 28, 2017 Is it the case that your application code runs ok on the old board, but
the exact same code does not run on the new board? If so, then the
first question would be what is different about the boards? Are the
PIC32 devices the same on both?
If you think there is a stack overflow then the easiest thing to do is
ensure stack overflow detection is turned on:
http://www.freertos.org/Stacks-and-stack-overflow-checking.html
PIC32MZ UART RX crashes prvIdleTaskPosted by arhancock on March 30, 2017 The boards are significantly different, starting with the PIC. The old one is PIC32MZ695F512L and the new one is PIC32MZ2048EFH144. I/O has been reorganized around the new PICs I/O ports. The serial ports remain the same. The application is normally flashed with a custom USB based boot loader, residing in the lower part of program flash space. A linker script is used in the application build to move the application up 256K.
If the application is build with the default linker script and flashed with a programmer, rather than with the boot loader, the serial RX works correctly.
Analyzing the load maps between the two versions has not revealed anything helpful.
Is there anything in FreeRTOS that needs to be adjusted for vector tables that have moved?
PIC32MZ UART RX crashes prvIdleTaskPosted by rtel on March 31, 2017 Not sure specifically for the PIC32 without cracking out the MIPS
manuals to remind myself, but often devices require a register to be set
to to the base address of the vector table. If the vector table is
moved then the bootloader should setup the required registers before
calling the application code.
PIC32MZ UART RX crashes prvIdleTaskPosted by arhancock on March 31, 2017 The boot loader jumps to a copy of the reset code in the application - effectively rebooting the PIC at the application's location. Again, many of the inerrupts are working, its just that UART TX event that trashes the system - event before the ISR get called.
PIC32MZ UART RX crashes prvIdleTaskPosted by arhancock on March 31, 2017 I found that if I move the ebase_addr in the linker script to place the IVT 64K above reset (rather than the 4K I had it at), the error goes away.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|