Armadilloフォーラム

sshに設定後、hwclockがエラーになる。

i.ishibashi

2023年7月11日 14時08分

Armadillo-IoTゲートウェイ A6 ボードモデル(U1モデル)
Armadillo-IoTゲートウェイ A6 U1モデル用 拡張I/Oボード01

以下の作業をするまでは hwclockが正常に取得出来ていました。

ssh接続をする為、
U1モデルのCON3を外部機器との通信インタフェースとして使用する
https://armadillo.atmark-techno.com/blog/10899/9867
を参考に作業。

・Linuxカーネルの改造
linux-v4.14-at58
arch/arm/boot/dts/armadillo-iotg-a6.dts
ファイル中の以下をコメントアウトし、Linuxカーネルをビルドし直しました。
#stdout-path = &uart3; コメントうアウト
ビルド後、作成したファイル
arch/arm/boot/uImage
arch/arm/boot/dtsarmadillo-iotg-a6-extboard.dts
を使用し
https://manual.atmark-techno.com/armadillo-iot-a6/armadillo-iota6_produ…
12.2.2. Linux カーネルイメージの書き換え
12.2.3. DTBの書き換え
を参考に armadillo-iotg-a6に書き込みました。

・ブートローダーの改造
デフォルトコンフィギュレーションを適用
make ARCH=arm armadillo-640_defconfig

make ARCH=arm menuconfig

Console --->
[*] Support a silent console
[*] Only silence the U-Boot console
[*] Changes to the 'silent' environment variable update immediately
[*] Allow flags to take effect on relocation

ビルドしたものをArmadillo-IoT A6に書き込むと
ブートローダーもCON3に対して入出力を行わなくなりました。

その後、COM3の動作確認も成功しました。

armadilloの電源を落とし
再度、SSH接続後にU1モデル用 拡張I/Oボード01を通して動かす(何でもよい)プログラムを動作確認。
間欠動作検証プログラムをテストしたら動きませんでした。

調べると、hwclockが動作していない事が見つかりました。
hwclockを入力しても
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: 無効な引数です
のエラーが返ってきます。
以下を参考に試しても、同じエラーが出ます。
https://armadillo.atmark-techno.com/forum/armadillo/9393
U1モデル用 拡張I/Oボード01の電池の交換も試しました。
• Armadillo の電源を OFF にして古い電池を取り外し、10 秒以上経
過した後に新しい電池を取り付ける。
も試しましたが変化なくエラーが出ます。

ログを検出(cat /var/log/syslog)すると
Jul 11 13:39:20 armadillo aiot-modem-controld[195]: ==> AT
Jul 11 13:39:20 armadillo aiot-modem-controld[195]: <== AT
Jul 11 13:39:20 armadillo aiot-modem-controld[195]: <==
Jul 11 13:39:20 armadillo aiot-modem-controld[195]: <== OK
Jul 11 13:39:20 armadillo aiot-modem-controld[195]: register_network(2836): no sim card.
Jul 11 13:39:50 armadillo aiot-modem-controld[195]: ==> AT
Jul 11 13:39:51 armadillo aiot-modem-controld[195]: <== AT
Jul 11 13:39:51 armadillo aiot-modem-controld[195]: <==
Jul 11 13:39:51 armadillo aiot-modem-controld[195]: <== OK
Jul 11 13:39:51 armadillo aiot-modem-controld[195]: register_network(2836): no sim card.
Jul 11 13:40:00 armadillo kernel: [ 690.199546] rtc-nr3225sa 4-0032: Voltage low, data is invalid.
Jul 11 13:40:00 armadillo kernel: [ 690.199910] rtc-nr3225sa 4-0032: Voltage low, data is invalid.

と表示され、電圧の低下、SIMカードがない と表示されていました。

現状SIMカードは使用していません。
インターネットはLANケーブルで接続されている状態です。
armadillo a6 のping8.8.8.8は動作しています。
LTE接続をしようとしている?
COM3を外部機器接続用にした事で起きたエラーと考えています。

また別のセット(2台目)でも試しまた。
Armadillo-IoTゲートウェイ A6 ボードモデル(U1モデル)
Armadillo-IoTゲートウェイ A6 U1モデル用 拡張I/Oボード01
hwclockが正常に動作します。その後、同じ様にSSH接続に設定変更後、hwclockにエラーが発生しました。

別の要因かもしれませんが、対処方法をよろしくお願いします。

コメント

at_syunya.ohshio

2023年7月12日 18時26分

大塩です。

> ・ブートローダーの改造
> デフォルトコンフィギュレーションを適用
> make ARCH=arm armadillo-640_defconfig
>
> make ARCH=arm menuconfig
>
> Console --->
> [*] Support a silent console
> [*] Only silence the U-Boot console
> [*] Changes to the 'silent' environment variable update immediately
> [*] Allow flags to take effect on relocation

ご参考頂いたブログの通り、armadillo-640_defconfig でコンフィグレーションを行っていただいていますが、
RTC変更版Armadillo-IoTゲートウェイ A6(RV-8803-C7搭載)の場合、
コンフィグレーションが armadillo-iotg-a6_defconfig でないと認識しないため
ご連絡頂いた現象が発生します。

この現象を解決する場合、上述の通り armadillo-640_defconfig ではなく
armadillo-iotg-a6_defconfig を使用する必要があります。
その際、make ARCH=arm menuconfig では以下のように変更してください。
ARM architecture --->
Console UART select (UART3) --->
(X) UART1
( ) UART3

これにより、armadillo-iotg-a6_defconfig でもCON3 を使用しなくなるため、外部機器との通信インタフェースとして使用出来ます。
動作確認してみてください。

以上です。

i.ishibashi

2023年7月13日 9時08分

> 大塩です。
>
> > ・ブートローダーの改造
> > デフォルトコンフィギュレーションを適用
> > make ARCH=arm armadillo-640_defconfig
> >
> > make ARCH=arm menuconfig
> >
> > Console --->
> > [*] Support a silent console
> > [*] Only silence the U-Boot console
> > [*] Changes to the 'silent' environment variable update immediately
> > [*] Allow flags to take effect on relocation
>
> ご参考頂いたブログの通り、armadillo-640_defconfig でコンフィグレーションを行っていただいていますが、
> RTC変更版Armadillo-IoTゲートウェイ A6(RV-8803-C7搭載)の場合、
> コンフィグレーションが armadillo-iotg-a6_defconfig でないと認識しないため
> ご連絡頂いた現象が発生します。
>
> この現象を解決する場合、上述の通り armadillo-640_defconfig ではなく
> armadillo-iotg-a6_defconfig を使用する必要があります。
> その際、make ARCH=arm menuconfig では以下のように変更してください。
> ARM architecture --->
> Console UART select (UART3) --->
> (X) UART1
> ( ) UART3
>
> これにより、armadillo-iotg-a6_defconfig でもCON3 を使用しなくなるため、外部機器との通信インタフェースとして使用出来ます。
> 動作確認してみてください。
>
> 以上です。

ブートローダーの改造もご指摘の通り armadillo-iotg-a6_defconfig で作業していました。
記述ミスの為、失礼しました。

> その際、make ARCH=arm menuconfig では以下のように変更してください。
> ARM architecture --->
> Console UART select (UART3) --->
> (X) UART1
> ( ) UART3
>
> これにより、armadillo-iotg-a6_defconfig でもCON3 を使用しなくなるため、外部機器との通信インタフェースとして使用出来ます。
> 動作確認してみてください。

確認後、hwclockが正常に動作しました。
ありがとうございます。