Yeltsin
1
Hi All,
I am trying to make a basic gpio blink dkm program with my pi4 with VxWorks. Has anyone managed to do this in the past ?
All the driver call’s seem to fail with status ERROR (-1). I am not quite sure what seems to be the problem.
vxbGpioLibInit (); → returns ERROR
vxbGpioAlloc (16); → returns ERROR
vxbGpioSetDir (16, GPIO_DIR_OUTPUT); → returns ERROR
vxbGpioSetValue (16, GPIO_VALUE_LOW);
taskDelay(100);
vxbGpioSetValue (16, GPIO_VALUE_HIGH);
vxbGpioFree(16);
The call to vxbGpioLibInit is not needed in your DKM. The rest of the commands can be run in the C shell to validate the API.
E.g.
-> vxbGpioAlloc(16)
value = 0 = 0x0
-> sysClkRateGet
value = 60 = 0x3c = '<' = buffer + 0x4
-> vxbGpioSetDir(16, 1)
value = 0 = 0x0
-> vxbGpioSetValue(16, 1)
value = 0 = 0x0
-> vxbGpioSetValue(16, 0)
value = 0 = 0x0
By the way, taskDelay(100) is equivalent to 1.6s with a clock rate of 60. All the function calls I used above returned 0, i.e. OK, not ERROR.
1 Like
Yeltsin
3
Thanks again Dan!
Can you please point me to the documentation of drivers specific to Release version: 22.03 for Pi 4?
Regards,
Yeltsin