Hi Cris!
Yes, now it works (The macros IOWR_ALTERA_AVALON_PIO_SET_BITS() and
IOWR_ALTERA_AVALON_PIO_CLEAR_BITS() work). After i have recreated my nios with sopc builder from scratch it suddenly worked. No change to my c-code. My pio still has a width of 18 bit.
Just to sum it up for the thread followers:
The macros IOWR_ALTERA_AVALON_PIO_SET_BITS() and
IOWR_ALTERA_AVALON_PIO_CLEAR_BITS() did not work because i missed to enable the individual bit setting/clearing when i set up the pio in the sopc builder. After enabling it and a nios rebuild the macros work fine.
Thanks for that advice Cris!
Best regards
FredFlintstone