rust-embedded/rust-raspberrypi-OS-tutorials

What determines the value of GPIO_PUP_PDN_CONTR_REG ?

jackyliu16 opened this issue · 0 comments

Recently, I was trying to enable jtag debugging on bare metal projects, and I found some problems while doing simple tests on this project, which may BC my STFW ability very poor.

There's something magical about the GPIO_PUP_PDN_CONTR_REG register setting, I really can't find the basis for making this setting.

Can you give me some advice?

Goal:
I want to enable jtag debug, which I thought at this point I needed to turn on all the pins I need.
Based on the bcm2711-peripherals (hereinafter referred to as BCMP) 5.3 Alternative Function Assignments, GPIO22-27 (with redundancy, but all jtag pins) should settings to alternate function 4.

commit of previous

image

After these settings ran in my board, all files inside the sd card crashed, their names became garbled. But, when I simply change this PullUp into PullDown in next commit, This issue has been fixed.

I finally made this fix based on BCMP::5.3 Alternative Function Assignments, which provide a column name Pull, and all pins between 22-27 are Low.
But it seems the quote is not perfect, which is based on tutorials, GPIO14,15 has been settings to High, when I trying to convert it into PullDown, it also collapsed(sd card). Base on BCMP::5.2 Register View the description after GPOP_PUP_PDN_CNTRL_REGx Register (The Alternate function table also has the pull state which is applied after a power down.), It doesn't look like this column is meant to describe the value of GPOP_PUP_PDN_CNTRL_REGx should be settings to.

By the way, when I searched the BCMP manual, I found there also a table in BCMP::11.3 Primary UART Inputs and Outputs, The value of GPOP14,15 is also inconsistent with PullUp provided in the tutorial, I have any kind of ideas about it and even more confused after the manual.

Thank you very much for your generous help and sharing.