I am working with QNX 6.3 on MPC Lite5200.
I want to use some GPIO Pins. So I have to
configurate a port. I want to use PSC3 for
GPIO. So I have to write in the GPS Port
Configuration Register (MBAR+0xB00). First
of all I tried to read this register with the
following code:
I am working with QNX 6.3 on MPC Lite5200.
I want to use some GPIO Pins. So I have to
configurate a port. I want to use PSC3 for
GPIO. So I have to write in the GPS Port
Configuration Register (MBAR+0xB00). First
of all I tried to read this register with the
following code:
thanks for your help. I see I have to use the functions for io mapped
architektures. I tried some addreses and I think 0xF0000000 ist the
base addres not 0x80000000. Probably the bsp change this default
address.
Regards Stephan
int main(int anz,char **args)
{
uintptr_t handle;
volatile uint32_t inhalt;
if(ThreadCtl(_NTO_TCTL_IO,0)==-1) printf(“Rechte nicht
vorhanden…\n”);
handle=mmap_device_io(0x04,0xF0000B00);
inhalt=in32(handle);
printf("%X\n",inhalt);
return 0;
}
thanks for your help. I see I have to use the functions for io mapped
architektures. I tried some addreses and I think 0xF0000000 ist the
base addres not 0x80000000. Probably the bsp change this default
address.
Regards Stephan
int main(int anz,char **args)
{
uintptr_t handle;
volatile uint32_t inhalt;
if(ThreadCtl(_NTO_TCTL_IO,0)==-1) printf(“Rechte nicht
vorhanden…\n”);
handle=mmap_device_io(0x04,0xF0000B00);
inhalt=in32(handle);
printf("%X\n",inhalt);
return 0;
}
Yes, the MGT5200 BSP moves the on-chip register base to 0xf0000000.