關於警報器硬件在Jerson Orin Nano板子中如何通過GPIO通訊?

Hi,

由於我是新手,我有一個警報器設備想在Jerson Orin Nano的Jetpack 6.2系統的板子上通過GPIO通訊,但是我不知道如何去通過板子跟設備通訊的。
我按照gpio的github賦予了用戶權限,且調用gpio API沒有出現任何異常;

然后我按照開發者指南中的命令修改了對應的引腳:busybox devmem 0x02430068 w 0x004;
但是給對應引腳發送指令的時候,警報器設備接收到一次命令後就無法接受第二次命令了。我現在不知道是什麼問題引擎的。

gpio-log是執行命令:gpioinfo gpiochip0 獲取的日誌
gpio-log.txt (9.7 KB)
busybox devmem-log是反復執行命令:busybox devmem 打印出來的日誌
busybox-devmem-log.txt (1.4 KB)
然後圖片是設備的接線圖,然後還有與板子的連接圖


請幫助我一下,我是個新手。我已經困在這裡很久了。

非常感謝

Hi 543945827,

Are you using the devkit or custom board for Orin Nano?

Are you connecting PIN29/PIN30 from 40-pins expansion header?

Can your Alarm device just controlled by GPIO?

root@szse-desktop:/home/szse# busybox devmem 0x02430068
0x00000404

It seems you hit a known GPIO issue in JP6.x, please refer to the following thread to get the fix.
40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - Jetson & Embedded Systems / Jetson AGX Orin - NVIDIA Developer Forums
If you don’t apply the patch, gpiod command would set bit 10 and cause it not working as GPIO.

Hi,

我使用的是Orin Nano定製版,使用的pin是29/30,警報器設備可以通過gpio通訊。我的板子重啟後重新執行命令:busybox devmem 0x02430068,打印的日誌信息是:0x00000058;

另外你說的這個補丁我不知道如何操作。因為我是一個新手,所以你說的這個補丁可不可以具體說一下,我應該如何操作更新呢?

非常感謝

Is the board designed by you?
Since we don’t clear about your custom carrier board, I’m not sure which GPIO maps to PIN29/PIN30.

Normally, we would suggest configuring pinmux register through pinmux spreadsheet.

Please refer to Kernel Customization — NVIDIA Jetson Linux Developer Guide to sync the kernel source first.

Hi, KevinFFF

我想問一下,同步內核源的話。是要在Jetpack 6.2系統板子上同步呢?還是要在Ubuntu 20.04/22.04的主機上採用OTG方式連接板子同步呢?

Hi, KevinFFF

還有一些信息我想補充一下。我的板子是: Jetson Linux 36.4.3 is part of JetPack 6.2;
我想這個版本的內核你是不是已經修復好了呢?
還有我剛才說錯了。我的板子不是定製版的,他是开发套件版的。就是你們對外銷售的標準版本;

Please perform those steps on an Ubuntu host PC and use USB-C cable to flash the board to apply the change.

Sorry, that patch does not include in current Jetpack 6.2(L4T r36.4.3) release.

Are you sure?
From the picture you shared as following, it does not look like our devkit.

Hi, KevinFFF

很感謝你能回復我。但是我還是有幾個問題想請教一下您。

KevinFFF:Please perform those steps on an Ubuntu host PC and use USB-C cable to flash the board to apply the change.

問題 1:我打上了內核補丁後,我後續應該怎麼操作呢?說明文檔裡面的三個構造步驟需要全部都執行嗎:1: Building the Jetson Linux Kernel,2: Building the NVIDIA Out-of-Tree Modules,3: Building the DTBs

問題2:還有你說的連接USB-C刷新電路板,我想知道連接USB-C之後怎麼刷新電路板呢?執行什麼命令去刷新呢?您可以告訴我嗎?

問題3: 在Building the Jetson Linux Kernel的時候,如果我不用Ubuntu 20.04/22.04的主機方式去更新,採用在Jetpack 6.2系統電路板上去交叉編譯後,直接把 ./Linux_for_Tegra/kernel/Image 路徑文件中的 Image文件手動替換Jetpack 6.2系統電路板上相應的Image文件,是否可行呢?

KevinFFF:Are you sure? From the picture you shared as following, it does not look like our devkit.


這是我們的電路板子,我想應該就是你們的開發套件版本的。

請理解我一下,我是一個新手。

非常感謝你的幫助!

Correct, please refer to those steps in case you missed something not updated.

What I mean is just to reflash your board.
How did you flash the board before?

Yes, it should also work for testing, but we would still suggest you reflashing the board to apply the change.

Okay, it looks like official developer kit.
But.. what are you connecting on 40-pins expansion header? (i.e. what is that white connection cable under your finger?)

Hi, KevinFFF

由於Jetpack電路板子是我們直接從商家那邊購買過來的,購買的時候整個板子都是一套可以運行的Jetpack 6.2 系統。所以我從來沒有刷過電路板的主板。

我剛才直接把Linux_for_Tegra/kernel目錄下Image文件直接手動複製覆蓋了Jetpack電路板中boot目錄下的Image文件。然後重啟之後就無法開機了。出現圖片中的問題。


你剛才不是說了,允許手動複製這個Image文件覆蓋Jetpack電路板中boot目錄下的Image文件嗎?我嘗試了,出現了這個錯誤。

非常感謝你的幫助!

There’s no error info in the image you shared.

Please share the full serial console log for further check.
Jetson Nano & NX Style - Serial Debug Console - JetsonHacks

Hi,

你可以回復一下這個問題嗎?

是否允許手動複製Linux_for_Tegra/kernel目錄下的Image文件覆蓋Jetpack電路板中boot目錄下的Image文件嗎?

就是我不採用刷寫主板的方式去更新了Jetpack電路板中boot目錄下的Image文件;請問這樣是否可以嗎?

非常感謝你的幫助!

理論上可行

Hi,

我嘗試了。不可行。直接進不去系統了。就卡在Exiting boot services…

我也沒有串口調試工具。也無法獲取到對應信息。

建議先取得一條串口調適線,否則無法知道設備內部發生什麼事

你目前可以嘗試拿一台Ubuntu host PC 透過SDK Manager重新燒錄板子看看是否能恢復

另外,能解釋下連接在40-pins上的白色排線是什麼嗎?

Hi

鏈接40-pins上的白色排線,是40-pins外接擴展轉接設備。

你還沒有告訴我,執行完這些構造後: 1: Building the Jetson Linux Kernel,2: Building the NVIDIA Out-of-Tree Modules,3: Building the DTBs ;後面我應該再執行那些命令才能讓主機上生成的構造的文件,如何更新到Jetpack 6.2系統電路板上的NVMe固態硬盤裡面呢?

還有我想問一下,我以前主機電腦上面沒有任何刷入電路板子的nvidia環境。相當於我要定制內核的話,需要從0開始搭建nvidia的刷入環境。如果需要內核定制的話,手動下載內核資源的時候,我應該下載那些呢?請看如下圖片。

我是新手菜鳥一枚,很多基本知識都不是很清楚,可以稍微詳細的跟我講解一下嗎?

謝謝您耐心的回答,非常感謝!!!

這看來是customize的東西,你要自行確認轉接後的pin define是不是跟原本一樣

Kernel Customization — NVIDIA Jetson Linux Developer Guide 這裡面有詳細的步驟從如何download source → 編譯->安裝到BSP package(<Linux_for_Tegra>/)

若你要刷寫到NVMe內,請嘗試下面的指令

$ sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --showlogs --network usb0 jetson-orin-nano-devkit internal

這個部分請參考 Quick Start — NVIDIA Jetson Linux Developer Guide
基本上要下載的是DRIVERS裡的 Driver Package (BSP)以及Sample Root Filesystem

或者你可以嘗試用SDK Manager燒錄一次後,它也會自動將BSP pakcage下載安裝在你的電腦上