cancel
Showing results for 
Search instead for 
Did you mean: 

stm32l1xx_ll_spi.h BUG and Warning

kisstibor
Associate
Posted on December 15, 2016 at 18:16

Dear Sirs

File : stm32l1xx_ll_spi.h

Very ugly BUG !!!!

__STATIC_INLINE void LL_GPIO_ResetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)

{

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

&sharpif defined(GPIO_BRR_BR_0)   !!!!!!!   Correct : 

(GPIO_BRR)  !!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

WRITE_REG(GPIOx->BRR, PinMask);

&sharpelse

WRITE_REG(GPIOx->BSRR, (PinMask << 16));

&sharpendif /* GPIO_BRR_BR_0 */

}

OpenSTM32 rise a warning :

arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32L100xC

stm32l1xx_ll_spi.h:1137:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

__STATIC_INLINE void LL_SPI_TransmitData16(SPI_TypeDef *SPIx, uint16_t TxData)

{

*((__IO uint16_t *)&SPIx->DR) = TxData;

}

This code compiled without warning :

__STATIC_INLINE void LL_SPI_TransmitData8(SPI_TypeDef *SPIx, uint8_t TxData)

{

*((__IO uint8_t *)&SPIx->DR) = TxData;

}

Thanks

Tibor Kiss

#stm32l1xx_ll_spi.h-warning
2 REPLIES 2
Imen.D
ST Employee
Posted on December 20, 2016 at 17:44

Dear

Kiss.Tibor

‌,

Please note that yourreported issueis tracked internally. It will bechecked andcome back to you.

All your feedback are welcome in order to improve our solutions.

Sorry for any inconvenience this may cause andThank you for your contribution.

Best Regards

-Imen-

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Imen.D
ST Employee
Posted on March 13, 2017 at 14:42

Hi,

After deep check in the firmware package, there is no issue faced with the GPIO_BRR_BR_0 definition.

Could you please explain your issue and the reason for giving your proposal?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen