Home > OS >  Xilinx zynq7000 Linux c GPIO CPU setting failure is how to solve
Xilinx zynq7000 Linux c GPIO CPU setting failure is how to solve

Time:11-16

Xilinx zynq is fpga CPU chip integrated together, now I want to use c language to write a program by lighting up a lamp, process is as follows:
Lamp gpio pin:
Emio bank2 module first pin (three color light of a lamp), the fpga has gave the PS gpio control end
Register Settings:
I set up in accordance with the chip manual DIRM_2 OEN_2 DATA_ three register
Application process:
Open to open/dev/mem
Mmap mapping GPIO base address
* (immap + DIRM_2 address offset) |=0 x1;//bank2 first pin 1 set to output function
* (immap + OEN_2 offset) |=0 x1;//can make output
* (immap + DATA_2 offset) |=0 x1;//write to the gpio several

Basic on this process, before a single CPU Settings register but don't know why not CPU and fpga integration, has been in accordance with the chip manual steps to set the register, but the lamp still dot not bright, could also not out, could you tell me the full programmable systems the lamp still need to do other steps: I can't PS what is the cause of the light: excuse me, how to solve?

CodePudding user response:

On the address corresponding in the device tree

CodePudding user response:

reference 1st floor YGLeeeon response:
on the address of the corresponding in the device tree?

No problem the problem is in the device tree EMIO gpio needs through fpga, need some configuration of fpga,

CodePudding user response:

refer to the second floor to protect 000 response:
Quote: refer to 1st floor YGLeeeon response:

On the address of the corresponding in the device tree?

No problem the problem is in the device tree EMIO gpio needs through fpga, need some configuration of fpga,
well, after this kind of situation seems to need the fpga design ready, to make device tree, then you can develop applications
  • Related