Jump to content
  • 0

Adding interrput module in petalinux remove access to register


chaitusvk

Question

Hi 

I made a custom axi counter which interupts processor for every 1 sec , i read counter value through axi bus  , i have written driver for reading BASE_reg of axi peripheral which is working fine. when i activate interrupt by including the deatils of peripheral in system

when i activate interrupt through  system-user.dtsi iam not able to read the device ....

my acces to axi_peripheral register is blocked 

please help me how to access the axi_register while enabling the interrupt 

Screenshot from 2020-09-28 19-40-42.png

Screenshot from 2020-09-28 19-49-15.png

system-user.dtsi simmod.c

Screenshot from 2020-09-28 22-17-07.png

Screenshot from 2020-09-28 22-17-22.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

1. Why did you set compatible string for amba_pl ?

2. Note since you did not implement write operation make sure you do not open the device in RW mode.

3. What operation does hellosim performs on device file? there should be your start point in tracking the issue.

4. Your issue is in function simmod_read after first printk => you have a null pointer.

Link to comment
Share on other sites

Thank @lonel 

1. I did not understand compatble string ...i am newbie

 

2. i have not opened the device in wite mode opened in only read mode.

3. hellosim just opens and reads the device.

4. In simmod read ie. Kernel driver i am reading membase address ..

 

my main probelm is 

if i dont include the device in Device tree i am able to read the Device perfectly . but i need to read Device on interrupt so i added it to Device tree .

When i add it to Device Tree Device, Base mem Address is becmming NULL 

 

 i dont know i to add Device to Device tree 

please help lonel ...

 

 

hellosim.c

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...