STM32 SPiv1 Driver

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
MobileWill
Posts: 27
Joined: Sat Jan 30, 2016 8:44 am

STM32 SPiv1 Driver

Post by MobileWill »

I am using the Makefile via Embitz and it can't find the declaration of

osalDbgAssert

Which I can't figure out why. The makefile includes osal.mk which has the declaration of it.

What am I missing?
MobileWill
Posts: 27
Joined: Sat Jan 30, 2016 8:44 am

Re: STM32 SPiv1 Driver

Post by MobileWill »

So strange the same project doesn't get this error in Eclipse. Hmm.
MobileWill
Posts: 27
Joined: Sat Jan 30, 2016 8:44 am

Re: STM32 SPiv1 Driver only in 16.1.3

Post by MobileWill »

So i reverted to the version that comes with ChibiOS Studio and all the errors I had are gone. So its an issue with 16.1.3.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32 SPiv1 Driver only in 16.1.3

Post by Giovanni »

MobileWill wrote:So i reverted to the version that comes with ChibiOS Studio and all the errors I had are gone. So its an issue with 16.1.3.


In which demo?

Giovanni
MobileWill
Posts: 27
Joined: Sat Jan 30, 2016 8:44 am

Re: STM32 SPiv1 Driver

Post by MobileWill »

The one complaining about osalDbgAssert being undefined. The other was about this line but Idk if it was related to OS version or Embitz but it shouldn't matter since I am using makefile.

palSetPadMode(GPIOA, 15, PAL_MODE_INPUT | PAL_STM32_PUDR_FLOATING);
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: STM32 SPiv1 Driver

Post by Tectu »

MobileWill wrote:The one complaining about osalDbgAssert being undefined. The other was about this line but Idk if it was related to OS version or Embitz but it shouldn't matter since I am using makefile.
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT | PAL_STM32_PUDR_FLOATING);

As far as I can tell PAL_STM32_PUDR_FLOATING is not a valid/available macro in ChibiOS/HAL 4.0.3. You might want to use this one instead (untested!):

Code: Select all

palSetPadMode(GPIOA, 15, PAL_MODE_INPUT | PAL_MODE_INPUT_PULLUP);


Regarding the issue with: It seems that in the file \os\hal\ports\STM32\LLD\SPIv1\spi_lld.c all osalDgbAssert() should be replaced with chDbgAssert(). But again: Not sure. I haven't worked a lot with the new ChibiOS version so far.


~ Tectu
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32 SPiv1 Driver

Post by Giovanni »

PAL_MODE_INPUT_PULLUP is sufficient.

Giovanni
Post Reply