Thanks,
I corrected the define debug as indicated and it OK too.

I do not understand the data sheet as far as the GPIO setting is concerned:
bit 5-0: GPIO<5:0>: General Purpose I/O pin.
1 = Port pin is >VIH
0 = Port pin is <VIL
I have to read both states of the pin.
Could you please clarify ?
Thanks
regards,
Ambrogio