I have two custom IPs one for SPI communication and another to control an audio transmitter. These devices are both controlled through AXI registers, and are connected to the AXI interconnect as slave 0 and 1. I have the device tree configured so that the IPs are "general-uio", and see them in /dev/uio* when inside of petalinux.
Individually, I can interact with them inside a petalinux build with just their respective IP included in the device tree and block diagram. I do this by mapping the memory of /dev/uioX, and then casting the void pointer attained from this to a volatile uint32_t pointer.
When I have the two IPs together I am able to memory map successfully, and I can even access the memory within the function I map it in. But when I leave that function I get a segmentation fault.
I have tried making the address global, which didn't work. I tried returning the void pointer from the function into the main file and passing it to other functions like that: this does work, but when I exit the function it was passed to I get the same segmentation fault.
If anyone has had similar issues to this please let me know how to resolve them.
Question
DMoore
Hello all,
I have two custom IPs one for SPI communication and another to control an audio transmitter. These devices are both controlled through AXI registers, and are connected to the AXI interconnect as slave 0 and 1. I have the device tree configured so that the IPs are "general-uio", and see them in /dev/uio* when inside of petalinux.
Individually, I can interact with them inside a petalinux build with just their respective IP included in the device tree and block diagram. I do this by mapping the memory of /dev/uioX, and then casting the void pointer attained from this to a volatile uint32_t pointer.
When I have the two IPs together I am able to memory map successfully, and I can even access the memory within the function I map it in. But when I leave that function I get a segmentation fault.
I have tried making the address global, which didn't work. I tried returning the void pointer from the function into the main file and passing it to other functions like that: this does work, but when I exit the function it was passed to I get the same segmentation fault.
If anyone has had similar issues to this please let me know how to resolve them.
Thanks,
D
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now