2017-03-24 08:11 AM
Hi everyone,
I'm trying to use SPI on SPC560B-DIS but the library lld_spi.c looks to be corrupted I have this error log:Assignment to itself 'spip->dspi->SR.R = spip->dspi->SR.R' spi_lld.cdoes someone know how to fix it??
Thanks in advance
Daniele.
#library #spi #assignment #spi_lld.cSolved! Go to Solution.
2017-04-10 08:07 AM
Hello Daniele ,
I think that it is a CDT Configuration issue
You can disable it in CDT configuration
http://stackoverflow.com/questions/23768307/why-does-eclipse-cdt-say-self-assignment-is-an-error
it does not generate compilation issue on Free Gcc, Hightec gcc and GHS
Best regards
Erwan
2017-03-28 02:41 AM
Hello Daniele ,
it is not a bug.
cf Chapter 28.5.5 in the RM0037
it is the DSPI Status Register
'The DSPIx_SR contains status and flag bits. The bits are set by the hardware and reflect the
status of the DSPI and indicate the occurrence of events that can generate interrupt or DMArequests. Software can clear flag bits in the DSPIx_SR by writing a ‘1’ to clear it (w1c).Writing a ‘0’ to a flag bit has no effect.'Best regards
Erwan
2017-04-07 04:05 AM
I don't understand what you mean with that or what is the solution or in general what should I do.
That instruction is in thelld_spi.c not written by me but from the developers of SPC5Studio and as soon i enable the
spi in the wizard the compiler includes the library and it founds the error.
there is a way to fix it?? Same problem occurres with CAN if i enable the the FlexCAN peripheral than i enable for instance FlexCAN0 if i generate and than compile it's impossible to compileAssignment to itself 'canp->flexcan->IFRH.R = canp->flexcan->IFRH.R' can_lld.c /prova CAN/components/spc560bxx_low_level_drivers_component_rla/lib/src line 95 Code Analysis Problem2017-04-10 08:07 AM
Hello Daniele ,
I think that it is a CDT Configuration issue
You can disable it in CDT configuration
http://stackoverflow.com/questions/23768307/why-does-eclipse-cdt-say-self-assignment-is-an-error
it does not generate compilation issue on Free Gcc, Hightec gcc and GHS
Best regards
Erwan
2017-04-11 03:39 AM
ok thank you Erwan