Hi,
The warnings about PSV models concerns Program Space Visibility.
When no PSV model option is given to an ISR, it uses __auto_PSV__ so that PSV can be used in the interrupt.
It is said in the manual that disabling PSV would reduce overhead (therefor latency) of ISR. In fact, I found that the difference is very small (<1µs), so I simply don't bother it and let the compiler add __auto_PSV__ to the ISR's options and warn me about that. This way, I am sure ISR will work. I used to mess with PSV and I remember debugging a program for hours before looking for PSV problems...
If wou want these warning to be removed, add __auto_psv__ the ISRs' attributes:
before
Code:
void __attribute__((__interrupt__)) _QEIInterrupt(void)
after
Code:
void __attribute__((__interrupt__, __auto_psv__)) _QEIInterrupt(void)
but it will do exactly the same.
Code:
save-res.c: In function 'save_setup':
save-res.c:64: warning: dereferencing type-punned pointer will break strict-aliasing rules
save-res.c:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
save-res.c: In function 'restore_setup':
save-res.c:105: warning: dereferencing type-punned pointer will break strict-aliasing rules
The calculation of the checksum addresses the pid struct as if it was an int array.I don't think there is any other way of doing CRC... The only thing you have to check is that pid struct's size is a multiple of int's size.
To tell the truth, I didn't changed LG's code in this file... I'm assuming it's working (as it actually is working "IRL" )
Code:
commands.c:48: warning: unknown conversion type character 0xd in format
About the last warning, it's strange... normally printf("%%"); outputs the percent (%) char, but my mistake printf("\%"); did the same
change (line 48 in command.c)
Code:
printf("(m)ax Output = %.2f%rn",(double)pid.maxoutput);
for
Code:
printf("(m)ax Output = %.2f%%rn",(double)pid.maxoutput);
Regards,
Max