Search found 4 matches

by ngm
Fri May 05, 2017 10:07 am
Forum: ChibiOS/HAL
Topic: PORT_G undeclared (first use in this function, HAL, pal_lld.h
Replies: 5
Views: 4346

Re: PORT_G undeclared (first use in this function, HAL, pal_lld.h

Hi mng,

It is the first time that I see this notation:

PORT_G


I think, you must use GPIOG instead of PORT_G.

You can have a look at the demo for the Nucleo f401re board.
It is under: trunk/demos/STM32/RT-STM32F401RE-NUCLEO64 if you are using trunk for example.


The macro was right. I just ...
by ngm
Fri May 05, 2017 10:05 am
Forum: ChibiOS/HAL
Topic: PORT_G undeclared (first use in this function, HAL, pal_lld.h
Replies: 5
Views: 4346

Re: PORT_G undeclared (first use in this function, HAL, pal_lld.h

Thanks Rocco. You are right about hal.h. I managed to figure it out. The macro "PORT_G" is correct. I just had to add hal.h instead of pal_lld.h

LG
ngm
by ngm
Tue May 02, 2017 2:06 pm
Forum: ChibiOS/HAL
Topic: PORT_G undeclared (first use in this function, HAL, pal_lld.h
Replies: 5
Views: 4346

PORT_G undeclared (first use in this function, HAL, pal_lld.h

Why am I getting the above error? I have included the "pal_lld.h" header file. Here is a snippet of my code. The PAL driver is ticked on.

#include "pal_lld.h"

void set_pin(bool state){

state ? pal_lld_setpad(PORT_G, 1) : pal_lld_clearpad(PORT_G, 1);
}
by ngm
Mon Apr 03, 2017 8:00 am
Forum: ChibiOS/RT
Topic: ADC, I2C, PWM ChibiOS examples on SPC560 Discovery board
Replies: 1
Views: 2561

ADC, I2C, PWM ChibiOS examples on SPC560 Discovery board

Hi,

I downloaded SPC5 studio and installed all the recommended tools including ChibiOS. But for my board, SPC560B54L5, there are no examples for basic stuff like ADC, I2C and PWM. The ones there are mostly for OS Less. Does anyone know where I can find these examples with ChibiOS?

Thanks,

ngm