STM32 SPiv1 Driver

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

Moderators: barthess, RoccoMarco

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

STM32 SPiv1 Driver

Postby MobileWill » Sun Feb 21, 2016 1:33 am

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

Postby MobileWill » Sun Feb 21, 2016 5:50 am

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

Postby MobileWill » Sun Feb 21, 2016 9:13 pm

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: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: STM32 SPiv1 Driver only in 16.1.3

Postby Giovanni » Sun Feb 21, 2016 11:57 pm

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

Postby MobileWill » Mon Feb 22, 2016 12:09 am

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: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: STM32 SPiv1 Driver

Postby Tectu » Wed Feb 24, 2016 8:08 pm

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: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: STM32 SPiv1 Driver

Postby Giovanni » Wed Feb 24, 2016 8:22 pm

PAL_MODE_INPUT_PULLUP is sufficient.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 4 guests