Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

PIC24FJ1024GB610

Posted by tinchogleria on July 5, 2017

Hi! I'm trying to compile freeRTOS demo for the PIC24FJ1024GB610 and the output when I build says: lcd.c: In function 'prvLCDGotoRow': lcd.c:148:3: error: 'PMADDR' undeclared (first use in this function) And the same for other symbols in the same file lcd.c. Any idea of what could I try to solve this issue? Thanks in advance.


PIC24FJ1024GB610

Posted by rtel on July 5, 2017

Sounds like the constants used in the Microchip libraries have been renamed. PMADDR is, I think the address of a register. What are the registers called in the libraries the latest Microchip tools come with?


PIC24FJ1024GB610

Posted by tlafleur on July 6, 2017

PMADDR is used on some PIc24/Pic33 as part of an optional peripheral "Parallel Master Port" and is not available on all devices.... should be easy to make the code change to drive the LCD..

Read the data sheet!

See AN1210 from Microchip on using the PMP device...

On Wed, Jul 5, 2017 at 1:41 PM Real Time Engineers ltd. rtel@users.sf.net wrote:

Sounds like the constants used in the Microchip libraries have been renamed. PMADDR is, I think the address of a register. What are the

registers called in the libraries the latest Microchip tools come with?

PIC24FJ1024GB610

https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#05b6/fc05

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~

Tom Lafleur


PIC24FJ1024GB610

Posted by tlafleur on July 6, 2017

Looks like the part your using has as an Enhanced Parallel Master/Slave Port, so you will need to understand the difference between the two devices.... again, read the data sheet for the part used in the FreeRTOS demo and the data sheet for the part your using to understand the difference ..

On Thu, Jul 6, 2017 at 5:22 AM Tom Lafleur lafleur@lafleur.us wrote:

PMADDR is used on some PIc24/Pic33 as part of an optional peripheral "Parallel Master Port" and is not available on all devices.... should be easy to make the code change to drive the LCD..

Read the data sheet!

See AN1210 from Microchip on using the PMP device...

On Wed, Jul 5, 2017 at 1:41 PM Real Time Engineers ltd. rtel@users.sf.net wrote:

Sounds like the constants used in the Microchip libraries have been renamed. PMADDR is, I think the address of a register. What are the

registers called in the libraries the latest Microchip tools come with?

PIC24FJ1024GB610

https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#05b6/fc05

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~

Tom Lafleur

~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~

Tom Lafleur


PIC24FJ1024GB610

Posted by tinchogleria on July 6, 2017

I thank you both for your prompt response. Where can I find information about the supposed LCD used by FreeRTOS in this example? I am trying to adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board, but I am missing information about the LCD used in the demo for freeRTOS. I guess this example has been written for an earlier version of the Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is TSB1G7000-E. Thanks again.


PIC24FJ1024GB610

Posted by tlafleur on July 6, 2017

It's a standard LCD display, look at the source code in microchip sample for the explorer 16 board. It's NOT a FreeRTOS supported file.

On Thu, Jul 6, 2017 at 1:51 PM Martin tinchogleria@users.sf.net wrote:

I thank you both for your prompt response. Where can I find information about the supposed LCD used by FreeRTOS in this example? I am trying to adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board, but I am missing information about the LCD used in the demo for freeRTOS. I guess this example has been written for an earlier version of the Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is TSB1G7000-E.

Thanks again.

PIC24FJ1024GB610

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~

Tom Lafleur


PIC24FJ1024GB610

Posted by tlafleur on July 6, 2017

data sheet...

http://ww1.microchip.com/downloads/en/DeviceDoc/TSB1G7000-Ev1.0.pdf

~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~

Tom Lafleur

On Thu, Jul 6, 2017 at 2:03 PM, lafleur tlafleur@users.sf.net wrote:

It's a standard LCD display, look at the source code in microchip sample for the explorer 16 board. It's NOT a FreeRTOS supported file.

On Thu, Jul 6, 2017 at 1:51 PM Martin tinchogleria@users.sf.net wrote:

I thank you both for your prompt response. Where can I find information about the supposed LCD used by FreeRTOS in this example? I am trying to adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board, but I am missing information about the LCD used in the demo for freeRTOS. I guess this example has been written for an earlier version of the Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is TSB1G7000-E.

Thanks again.

PIC24FJ1024GB610 https://sourceforge.net/p/freertos/discussion/382005/

thread/74d73758/?limit=25#7552

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

~~ */) ~~~~ */) ~~~~ */) ~~~~ */) ~~

Tom Lafleur

PIC24FJ1024GB610

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

Attachments

alternate (3209 bytes)

PIC24FJ1024GB610

Posted by tlafleur on July 6, 2017

controller data sheet...'

Novatek NT7603 Controller Datasheet - Crystalfontz https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiMlv3n0PXUAhVW02MKHYrLDGEQFggpMAA&url=https%3A%2F%2Fwww.crystalfontz.com%2Fcontrollers%2FNovatek%2FNT7603%2F392&usg=AFQjCNGnKHYJ6omi-jJVIjbON2C0Gvwf-Q https://www.crystalfontz.com/controllers/Novatek/NT7603/392

~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~

Tom Lafleur

On Thu, Jul 6, 2017 at 2:43 PM, lafleur tlafleur@users.sf.net wrote:

data sheet...

http://ww1.microchip.com/downloads/en/DeviceDoc/TSB1G7000-Ev1.0.pdf

~~ */) ~~~~ */) ~~~~ */) ~~~~ */) ~~

Tom Lafleur

On Thu, Jul 6, 2017 at 2:03 PM, lafleur tlafleur@users.sf.net wrote:

It's a standard LCD display, look at the source code in microchip sample for the explorer 16 board. It's NOT a FreeRTOS supported file.

On Thu, Jul 6, 2017 at 1:51 PM Martin tinchogleria@users.sf.net wrote:

I thank you both for your prompt response. Where can I find information about the supposed LCD used by FreeRTOS in this example? I am trying to adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board, but I am missing information about the LCD used in the demo for freeRTOS. I guess this example has been written for an earlier version of the Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is TSB1G7000-E.

Thanks again.

PIC24FJ1024GB610 https://sourceforge.net/p/freertos/discussion/382005/

thread/74d73758/?limit=25#7552

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

~~ */) ~~~~ */) ~~~~ */) ~~~~ */) ~~ Tom Lafleur

PIC24FJ1024GB610 https://sourceforge.net/p/freertos/discussion/382005/

thread/74d73758/?limit=25#7552/9169

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


PIC24FJ1024GB610

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

Attachments

alternate (4848 bytes)

PIC24FJ1024GB610

Posted by tinchogleria on July 21, 2017

I want to share how I finally solved this issue. I copy from Microchip Explorer16/32 demo application the lcd.c and lcd.h files into the freeRTOS demo application (renaming them to lcddriver.c and lcddriver.h) and I used the functions from this files from the originals lcd.c and lcd.h freeRTOS files, commenting the implementation and calling the analog functions coded in lcd_driver.c with a few changes and adaptions. If anybody need the code, just ask!


I've solved the lcd issue, but I could not say that the full run of the demo application was successful. I had the following issues: 1. Task#2 and Task#4 failed. 2. The demo app is being reseted frecuently. 3. I'm pretty sure that the clock configuration is wrong, and that is causing problems too. To clarify, Task#2 is what in the code is called ComTestTasks, two tasks related to the use of UART2 and a 9-way serial port included in the version of Explorer16 on which this port was based. Task#4 is what in the code is called BlockTimeTasks, a pair of task wich try to pass some tests related to the use of queues and blocking times. About the 3 points above, I have: 1. Task#2 is now disable following the recomendation of a member of official support, arguing that tha task is about a port that is no available in the demo board I'm using. Task#4 is still failing with some frequency. 2. Based on other recomendation of a member of official support, I checked Watchdog configuration, and I realized that is turned on. Is not clear if this is how supposed to be or not. 3. I've measured with a digital oscilloscope the pulse in the leds that are being blinked by 5 co-routines, and I noted that the relationship between the times measured and the times programmed is 16:1, slower in the measurment. So I try setting the clock speed to 1/16 the actual value, but the result was not good. Everything is REALLY slower now. The specific change I've made about this was in FreeRTOSConfig.h file, being the original state: ~~~

define configCPUCLOCKHZ ( ( unsigned long ) 16000000 ) /* Fosc / 2 */

~~~ And now: ~~~

define configCPUCLOCKHZ ( ( unsigned long ) 1000000 ) /* Fosc / 2 */

~~~

My BIG questions are:

1) Where are the configurations bits programmed in this demo application sources? 2) Is the watchdog being used or should be disabled? And the most important: 3) Anyone could run this demo in the current Explorer 16/32 (DM240001-3) having everything working? Thanks a lot for reading.


PIC24FJ1024GB610

Posted by rtel on July 21, 2017

1) Where are the configurations bits programmed in this demo application sources?

If they are then you will see the #pragma statements that set the bits at the top of main.c. If the statements are not there then the bits are being set via settings in the project (accessed and changed from the IDE).

2) Is the watchdog being used or should be disabled?

The application is not using it at all - not even kicking (resetting) it. It needs to be disabled.


PIC24FJ1024GB610

Posted by tinchogleria on July 24, 2017

Thanks for your reply. About WDT, it is disabled now. I haven't watched the system reseting then. About configuration bits, is really intriguing for me not see them anywhere in the code. I've read all documentation about starting guides and it never mentions anything about set the configuration bits. 1. When you set-up the project for the port PIC24, how did you do to set up the configurations bits? 2. Do all demo applications lack a section of code dedicated to the configuration bits?

I'm not sure how should I configure de bits related to the clock configuration. 3. What clock source should I choose? Where can I find information about this?

I put here the section of the configuration of bits relative to the configuration of the clock in the hope that you can guide me. (Copy-paste from IDE): // FOSCSEL #pragma config FNOSC = OSCFDIV // Oscillator Source Selection (Oscillator with Frequency Divider) #pragma config PLLMODE = DISABLED // PLL Mode Selection (No PLL used; PLLEN bit is not available) #pragma config IESO = ON // Two-speed Oscillator Start-up Enable bit (Start up device with FRC, then switch to user-selected oscillator source)

// FOSC #pragma config POSCMD = NONE // Primary Oscillator Mode Select bits (Primary Oscillator disabled) #pragma config OSCIOFCN = OFF // OSC2 Pin Function bit (OSC2 is clock output) #pragma config SOSCSEL = ON // SOSC Power Selection Configuration bits (SOSC is used in crystal (SOSCI/SOSCO) mode) #pragma config PLLSS = PLL_PRI // PLL Secondary Selection Configuration bit (PLL is fed by the Primary oscillator) #pragma config IOL1WAY = ON // Peripheral pin select configuration bit (Allow only one reconfiguration) #pragma config FCKSM = CSDCMD // Clock Switching Mode bits (Both Clock switching and Fail-safe Clock Monitor are disabled)


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner