Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
Is S32K3 TCPIP RTM 1.0.1HF1 based on S32K3 RTD RTM2.0.0 or based on S32K3 RTD RTM2.0.1 I tested S32K3-T-BOX using S32K3_T_BOX_LWIP_for_S32K3.zip.I install S32K3 RTD RTM2.0.0 and FreeRTOS2.0.0,but i can not install TCPIP RTM 1.0.1HF1(It prompts me to install S32K3 RTD RTM2.0.1). However, the code supported by NXP WEB is depended onS32K3 RTD RTM2.0.0. I can not find TCPIP RTM 1.0.1 without HF1 on nxp web,only TCPIP RTM 1.0.1HF1. Can you give me a code based on S32K3 RTD RTM2.0.1 or a TCPIP RTM 1.0.1 without HF1? Re: Is S32K3 TCPIP RTM 1.0.1HF1 based on S32K3 RTD RTM2.0.0 or based on S32K3 RTD RTM2.0.1 Hi @xMaryAES, Please enter a support case through Support Ticket.  Re: Is S32K3 TCPIP RTM 1.0.1HF1 based on S32K3 RTD RTM2.0.0 or based on S32K3 RTD RTM2.0.1 Hi @Julián_AragónM , Could you please share with me too the TCP/IP RTM 1.0.1 without HF1 or guide me to where I can find it? S32K3-T-BOX  Thank you! Regards. Re: Is S32K3 TCPIP RTM 1.0.1HF1 based on S32K3 RTD RTM2.0.0 or based on S32K3 RTD RTM2.0.1 Hi @Julián_AragónM , Could you please share with me the TCP/IP RTM 1.0.1 without HF1 compatible with S32K3 RTD RTM2.0.0? Regards, T1AES Re: Is S32K3 TCPIP RTM 1.0.1HF1 based on S32K3 RTD RTM2.0.0 or based on S32K3 RTD RTM2.0.1 Could you send the  S32K3 TCPIP RTM 1.0.1 without hf1 to me ? thank you. Re: Is S32K3 TCPIP RTM 1.0.1HF1 based on S32K3 RTD RTM2.0.0 or based on S32K3 RTD RTM2.0.1 Hi @SCoder41, I'm not sure about the visibility in Flexera, but I have sent you a private message with the UpdateSite for TCP/IP RTM 1.0.1 without HF1. Best regards, Julián
查看全文
如果 s32k 支持 openOCD 你们好 我想知道 S32K 系列(如 S32K144& S32K344)是否支持 openOCD。如果支持,在哪里可以找到这些 S32K 的 cfg 文件? Re: if s32k support openOCD 我板里的 s32k144,也许你可以用 "s32k.cfg" ? 我的 openocd 版本是 "Open On-Chip 调试器 0.12.0+dev-snapshot (2025-07-16-14:15)" Re: if s32k support openOCD 你好@rtzeropti 在OpenOCD网站上,没有关于官方支持S32K设备的信息。 OpenOCD 社区是寻求支持的最佳场所。 B.R. VaneB Re: if s32k support openOCD 我也有同样的问题,如何支持 CMSIS-DAP 调试器?
查看全文
if s32k support openOCD Hello guys, I wanna know if S32K series(such as S32K144 & S32K344) support openOCD. If is supported, where could I find cfg files for these S32K? Re: if s32k support openOCD the s32k144 in my board, maybe you can use "s32k.cfg" ? my openocd version is "Open On-Chip Debugger 0.12.0+dev-snapshot (2025-07-16-14:15)" Re: if s32k support openOCD Hi @rtzeropti  On the OpenOCD website, there is no information about official support of S32K devices.  The OpenOCD community would be the best place to ask for support. B.R. VaneB Re: if s32k support openOCD I have the same question,how to support CMSIS-DAP debuger?
查看全文
DCP 哈希缓存对齐问题 + 潜在的 HAL Bug 您好! 我和同事在尝试使用 MIMXRT1062 的数据协处理器实现加速 CRC-32 时,遇到了一些奇怪的行为。 我们相信,我们已经将问题定位为与 DCP 驱动程序处理缓存对齐方式有关的错误,但我们仍然对所看到的情况有些困惑。 这个问题最初清单为,当我们的生产应用程序尝试 CRC 大量内存块时,在特定条件下,我们的生产应用程序会出现 CRC 故障。CRC 哈希在单元测试中始终运行良好,但是如果我们重现特定的操作序列,我们可以在应用程序中可靠地触发信号它失败。目前,我还不确定它是以错误代码失败,还是返回了错误的 CRC 值,因为它发生的方式很难调试。 本周我们将继续对此进行调查。 幸好,我的同事找到了解决问题的 "创可贴":在我们的 dcp_hash_ctx_t 实例(存储在 DTCM 中)中附加一个 alignas(32) 声明。这样,CRC 就能可靠地工作,我们再也无法重现这个问题了。 为了更好地理解这个问题,我们查看了 HAL 的 DCP 驱动程序,试图了解其中的对齐方式是怎么回事。 我们发现的是......问题。 问题很多。 我将按照从轻到重的顺序列出我们发现的问题。 低效的 DCP_FindCacheLine() 实现 该功能旨在从一个地址向前查找下一个高速缓存行。 它可以工作,但效率极低,尤其是对于每次使用 DCP_HASH 函数时都要调用的函数而言--它使用循环来完成本应是恒定时间的操作。 我为你写了一个新版本,它使用乘法& 除法运算来实现同样的结果。 (也可以使用位运算,但不太清楚,这些运算是 2 的幂乘除,因此编译器会优化为位运算)。 /** * @brief Advances \c dcpWorkExt forward until a cache line boundary is reached. * @return Cache-aligned pointer between 0 and FSL_FEATURE_L1DCACHE_LINESIZE_BYTE-1 bytes ahead of \c dcpWorkExt */ static inline uint32_t *DCP_FindCacheLine(uint8_t *dcpWorkExt) { // Use integer division to divide the address down to the cache line size, which // rounds to the cache line before the given address. // So that we always go one cache line back even if the given address is on a cache line, // subtract 1. ptrdiff_t prevCacheLine = ((ptrdiff_t)(dcpWorkExt - 1)) / FSL_FEATURE_L1DCACHE_LINESIZE_BYTE; // Now we just have to multiply up again to get an address (adding 1 to go forward by 1 cache line) return (uint32_t *)((prevCacheLine + 1) * FSL_FEATURE_L1DCACHE_LINESIZE_BYTE); } 无论如何,请采纳这一条,并用它取代目前的实施方案! DCP_HASH_Init() 中的断言不正确 DCP_HASH_Init() 中的代码包含以下断言: BUILD_ASSURE(sizeof(dcp_hash_ctx_t) >= sizeof(dcp_hash_ctx_internal_t), dcp_hash_ctx_t_size); 但是,这对于启用 DCACHE 的情况是不正确的,因为 findCacheLine 函数可能会将上下文指针提前多达 31 字节。老实说,我们都很幸运 dcp_hash_ctx_t(256 字节)比 dcp_hash_ctx_internal_t(188 字节)大 > 32 字节;如果不是这样,那么你可能会进行越界写入,具体取决于它必须向前推进多远才能找到缓存行,而不是我想处理的海森堡! 为了解决这个问题,我认为应该使用这个断言: #if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) && defined(DCP_USE_DCACHE) && (DCP_USE_DCACHE == 1U) BUILD_ASSURE(sizeof(dcp_hash_ctx_t) >= (sizeof(dcp_hash_ctx_internal_t) + FSL_FEATURE_L1DCACHE_LINESIZE_BYTE - 1), dcp_hash_ctx_t_size_too_small); #else BUILD_ASSURE(sizeof(dcp_hash_ctx_t) >= sizeof(dcp_hash_ctx_internal_t), dcp_hash_ctx_t_size_too_small); #endif DCP_HASH 函数中不正确的缓存对齐方法 我们发现的最严重问题影响到 DCP_HASH_Init()、DCP_HASH_Update() 和 DCP_HASH_Finish() 函数。 所有这些函数都包含以下代码,这些代码似乎想要对齐 dcp_hash_ctx_internal_t: /* Align structure on DCACHE line*/ #if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) && defined(DCP_USE_DCACHE) && (DCP_USE_DCACHE == 1U) ctxInternal = (dcp_hash_ctx_internal_t *)(uint32_t)((uint8_t *)ctx + FSL_FEATURE_L1DCACHE_LINESIZE_BYTE); #else ctxInternal = (dcp_hash_ctx_internal_t *)(uint32_t)ctx; #endif 不幸的是,这......行不通。 根本没有。 它只是将传递的指针递增 1 个缓存行大小,而不是对其进行任何对齐操作。 因此,一直以来,除非 dcp_hash_ctx_t 结构本身是高速缓存对齐的,否则散列函数实际上无法使用高速缓存对齐的缓冲区。 这似乎部分解释了为什么我同事的修复工作会成功,因为这意味着在我们手动对齐之前,结构实际上并没有对齐。 我们认为正确的代码可能是 /* Align structure on DCACHE line*/ #if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) && defined(DCP_USE_DCACHE) && (DCP_USE_DCACHE == 1U) ctxInternal = (dcp_hash_ctx_internal_t *)DCP_FindCacheLine((uint8_t *)ctx); #else ctxInternal = (dcp_hash_ctx_internal_t *)(uint32_t)ctx; #endif 剩余问题 虽然我们似乎在短期内解决了这个问题,但我觉得我们还需要更多的信息,才能认为这个问题已经解决了。 使用 DCP 的 CRC 将是我们应用的关键部分,如果我们发现 CRC 做得不可靠,以后就很难将它们分离开来。 因此,我们需要绝对确定我们看到的问题已通过这些更改得到解决,然后才能继续前进(这很困难,因为我们无法在测试中重现该问题)。 因此,我有两个问题,希望能得到解答: 有人能确认我们发布的三件事是否真的是 DCP HAL 驱动程序中的问题,如果是,它们是否会在未来的版本中得到修复? 有人能评论一下我们看到的问题(CRC 操作失败)是否真的是由这些错误(内部哈希上下文未对齐)造成的吗? 尽管有评论和另一个论坛帖子指出这两件事有联系,但我找不到任何明显的**原因。 这尤其令人费解,因为 DCP 上下文位于 DTCM 中,因此不需要显式缓存管理(对吗?) DCP 是否只是假定事情是缓存对齐的,而没有在任何地方说明? 感谢您阅读这些内容,希望您能帮助我们解决这些问题! 非常感谢! i.MX RT106x Re: DCP Hashing Cache Alignment Issues + Potential HAL Bugs 你好 在 SDK 25.06.00 中,DCP HASH 功能仍然被破坏 - 在循环增量调用DCP_HASH_Update时完全无法使用,而单次调用则可以正常工作(但我们不能以这种方式使用它)。我们也尝试了建议的补丁,但还是不行。两年了,怎么可能还没有修补程序?有计划尽快修复吗? 谢谢并致以最崇高的敬意, Stefano Re: DCP Hashing Cache Alignment Issues + Potential HAL Bugs 嗨,迭戈、 谢谢你回复我们,我知道这对我们来说是个不小的打击! 遗憾的是,经过进一步测试,我们无法可靠地重现该问题。 我们合并了本帖中的修复后,就再也没有出现过这种情况。 我知道这并不能证明它们是有效的,但我确实认为应该对驾驶员做出这些改变。 不管怎么说,还是要感谢你提供的这些修复方案! 杰米 Re: DCP Hashing Cache Alignment Issues + Potential HAL Bugs 你好@MultipleMonomials 很抱歉没有早点联系你。 这个问题需要我们进一步调查。所以,我现在还无法回答你的问题。我很高兴知道您正在报告代码改进情况,以防止部分问题的发生。 我可以要求提供更多细节来复制这个问题吗?我们如何修改 SDK 中的 DCP 演示,以便在 evk 中复制这一功能?这样做只是为了便于诊断错误并向错误小组报告。 一切顺利 迪亚戈
查看全文
返回 HSE_SRV_RSP_INVALID_PARAM S32K314 集成 "Crypto_43_HSE_TS_T40D34M50I0R0" 之后,调用函数 " "Crypto_43_HSE_Exts_FormatKeyCatalogs""加密密钥目录 Crypto_43_HSE_KeyElementSet" 返回 HSE_SRV_RSP_INVALID_PARAM。可能的原因是什么?此外,我确认 Crypto 使用的所有 RAM 都配置为不可缓存。 Re: returns HSE_SRV_RSP_INVALID_PARAM 顺便提一句,我可以告诉你,我在尝试加载 AES 密钥时并没有实际使用 SHE 密钥。 Re: returns HSE_SRV_RSP_INVALID_PARAM 您好, ,我在 S32K312 上遇到了与驱动程序 Crypto_43_HSE v6.0.0 (Crypto_43_HSE_TS_T40D34M60I0R0) 完全相同的问题。 我成功格式化了密钥目录,可以看到 HSE 状态报告为 0x0B60,因此 CUST_DEL 应该处于激活状态。 在 NvM 和 Ram 密钥目录中,我有以下配置: 但我得到 当我尝试使用 KeyElementSet 来初始化键时,出现了 HSE_SRV_RSP_INVALID_PARAM。 Re: returns HSE_SRV_RSP_INVALID_PARAM 感谢您的帮助。问题解决了!非常感谢。 Re: returns HSE_SRV_RSP_INVALID_PARAM 感谢您的回复;我附上了 EB 配置文件和一些截图 Re: returns HSE_SRV_RSP_INVALID_PARAM 生命周期没有问题。您的设备仍在 CUST_DEL 中。 能否告诉我 NVM 和 RAM 目录是如何定义的? Re: returns HSE_SRV_RSP_INVALID_PARAM 谢谢您的答复。根据这张内存截图,您能找出任何问题吗? Re: returns HSE_SRV_RSP_INVALID_PARAM 你好@hangwu 很抱歉延迟回复。 您还处于 CUST_DEL 生命周期吗?要确认这一点,最简单的办法是请将 0x1B00_0220 - 0x1B00_026F 处的内存截图发给我。 目录只能在 CUST_DEL 生命周期中格式化,因此这可能是根本原因。下一个失败的命令(keyelementset......)可能只是目录未格式化的结果。 此致, Lukas returns HSE_SRV_RSP_INVALID_PARAM 由于项目限制,我无法提供完整的可运行项目。以下是两个主要源文件。我集成了"S32K3XX_S32M27x_RTD_R21-11_5.0.0_P08"RTD 套餐。EB 配置严格如下: " \S32K3XX_S32M27x_RTD_R21-11_5.0.0_P08\eclipse\plugins\Crypto_43_HSE_TS_T40D34M50I0R0\examples\EBT\S32K3XX" 。 我测试了随机数生成、哈希值、UpdateFw、GetFwVersion 和其他服务,所有工作都正常。然而 "Crypto_43_HSE_Exts_FormatKeyCatalogs" "Crypto_43_HSE_KeyElementSet" "Crypto_43_HSE_KeySetValid" "Crypto_43_HSE_ProcessJob" 全部返回"HSE_SRV_RSP_INVALID_PARAM" 。 我发现HSE_STATUS_INSTALL_OK 位被清零,于是尝试调用 FormatKey,但失败了。 Re: returns HSE_SRV_RSP_INVALID_PARAM 你好@hangwu 能否分享一些简单的项目来重现该问题? 此致, Lukas
查看全文
1つのArduinoに2つのMPR121センサを搭載 -> シリアル通信 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2つの(0x5A、0x5B)アドレスを接続しようとしています。 コードとデータシートには、addr ピンを (デフォルト、3.3 V) に接続するだけで通信が可能になると記載されています。 Arduino は他のセンサを認識しますが、一度に 2 つのタッチ センサを読み取ることはできません。i=0 ~ 11 とだけ表示されます i=12~23 を実行するにはどうすればよいですか? コード内で 2 つのセンサを区別するにはどうすればよいでしょうか? mpr121 センサ同士で通信することは可能ですか? 1 つの Arduino に 2 つのセンサを接続する方法を本当に知りたいです。 配線を確認するためにi2cスキャナも試しました 奇妙なことに、シリアル モニターは 1 つのセンサしか表示しません。 これが私のコードです 区別するために最初に何か定義を追加する必要がありますか? または ループを変更する のために{ } できるだけ早く教えてくださいX( ------------------------------------------------------------------------------------------------------------------------------------ #include "SoftwareSerial.h" //#define defaultPatch 15 //악기 초기화 버튼 설정 악기번호 ソフトウェアシリアル mySerial(2, 3); //SW の機能 D3 MIDI 機能、D2 の機能 バイトノート = 0; //MIDI 연주될 ノート(음계) バイトリセットMIDI = 4; // VS1053 リセット バイトledPin = 13; //MIDI 트래픽 표시용 LED #include #include "Adafruit_MPR121.h" #ifndef _BV #define _BV(ビット) (1 << (ビット)) #endif Adafruit_MPR121 キャップ = Adafruit_MPR121(); #MPR121addr 0x5A を定義する #MPR121addr 0x5B を定義する uint16_t 最後にタッチされた = 0; uint16_t currtouched = 0; #include int btn[]={60, 62, 64, 65, 67,69, 71, 72, 74, 76, 77, 79, 81、83、84、86、88、89、91、93、95、96、98、100}; バイト byteData; void セットアップ() { シリアル.begin(9600); mySerial.begin(9600); /* while (!Serial) { // leonardo/micro が高速に起動しないようにするために必要です! 遅延(10); } */ Serial.println("Adafruit MPR121 静電容量式タッチセンサーテスト"); // デフォルトのアドレスは 0x5A です。3.3V に接続されている場合は 0x5B です。 // SDAに接続されている場合は0x5C、SCLに接続されている場合は0x5D if (!cap.begin(0x5A)) { シリアル.println("MPR121-A見つかりません。配線を確認してください。"); (1)の間 } シリアル.println("MPR121-A見つかった!"); // if (!cap.begin(0x5B)) { シリアル.println("MPR121-B見つかりません。配線を確認してください。"); (1)の間 } シリアル.println("MPR121-B見つかった!"); //VS1053をリセットする pinMode(resetMIDI, OUTPUT); digitalWrite(resetMIDI, LOW); 遅延(100); digitalWrite(resetMIDI, HIGH); 遅延(100); } void loop() { currtouched = cap.touched(); (uint8_t i=0; i<12; i++) の場合 { // タッチされたが、以前はタッチされていなかった場合は警告! if ((currenttouched & _BV(i)) && !(lasttouched & _BV(i)) ) { シリアル.print(i);シリアル.println("触れた"); // トーン(0, btn[i],100); noteOn(0, btn[i],100); //tone(ブザーピン、周波数[i]、330); } } (uint8_t i=12; i<24; i++) の場合 { // タッチされたが、以前はタッチされていなかった場合は警告! if ((currenttouched & _BV(i)) && !(lasttouched & _BV(i)) ) { Serial.print(i); Serial.println(" タッチされました"); // トーン(0, btn[i],100); noteOn(0, btn[i],100); //tone(ブザーピン、周波数[i]、330); } } //*************** MIDI ループバック ******************// if(Serial.available()> 0) { byteData = Serial.read(); mySerial.write(バイトデータ); } lasttouched = currtouched; 戻る; } //MIDI ノートオン メッセージを送信します。ピアノの鍵盤を押すように //チャネルの範囲は0~15 void noteOn(バイトチャネル、バイトノート、バイトアタックベロシティ) { talkMIDI( (0x90 | チャネル), ノート, attack_velocity); } //MIDI ノートオフ メッセージを送信します。ピアノの鍵盤を放すように void noteOff(バイトチャネル、バイトノート、バイトリリースベロシティ) { talkMIDI( (0x80 | チャネル), ノート, release_velocity); } //MIDI ノートを再生します。cmd が 127 より大きいか、データ値が 127 より小さいかをチェックしません。 void talkMIDI(バイトコマンド、バイトデータ1、バイトデータ2) { digitalWrite(ledPin, HIGH); mySerial.write(コマンド); mySerial.write(データ1); // 一部のコマンドにはデータ バイトが 1 つしかありません。0xBn未満のすべてのコマンドは2つのデータバイトを持ちます //(ある意味: http://253.ccarh.org/handout/midiprotocol/) if( (コマンド & 0xF0) <= 0xB0) mySerial.write(data2); digitalWrite(ledPin, LOW); } タッチ・センサ Re: 2 mpr121 sensors in one arduino -> serial communication 私は MPR121 を 1 つしか持っていない、SO コードを試すことができませんでしたが、以下のように変更する必要があると思います。 (uint8_t i=0; i<12; i++) の場合 { // タッチされたが、以前はタッチされていなかった場合は警告! if ((currenttouched & _BV(i)) && !(lasttouched & _BV(i)) ) { シリアル.print(i);シリアル.println("触れた"); // トーン(0, btn[i],100); noteOn(0, btn[i],100); //tone(ブザーピン、周波数[i]、330); } } (uint8_t i=0; i<12; i++) の場合 { // タッチされたが、以前はタッチされていなかった場合は警告! if (( currtouched2 & _BV(i)) && !(lasttouched2 & _BV(i)) ) { //センサーがタッチされたら何かする シリアル.print( i+12 );シリアル.println("触れた"); noteOn(0, btn[i],100); } } MPR121 には 12 個の入力があり、_BV(bit) ビット パラメータは常に 0 ~ 12 の範囲である必要があり、 currtouched2を使用して異なる ADDR を選択します。 Lib の 230 行目: https://github.com/adafruit/Adafruit_MPR121/blob/master/Adafruit_MPR121.cpp Re: 2 mpr121 sensors in one arduino -> serial communication 2 つの MPR121 ボードを、アドレス 0x5C と 0x5A で Arduino Uno にコネクテッドしました。ボードは正しく認識されています。ただし、両方のボードを AUTOCONFIG モードに設定する方法と、両方のボード上の各センサの TOUCH および RELEASE しきい値を調整する方法を理解したいと思います。現時点では、これらの設定を行うために .CPP ファイルを使用していますが、0x5a アドレス ボードでのみ機能するようです。ありがとう! Re: 2 mpr121 sensors in one arduino -> serial communication <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ジンさん 4 つの MPR121 センサすべてを同じ I2Cバスに接続できたと聞いてうれしく思います。 現在の質問についてはよく分かりませんが、現在通信しているセンサのアドレスに応じて、ソフトウェアで簡単に実行できると思います。 よろしくお願いいたします。 トーマス Re: 2 mpr121 sensors in one arduino -> serial communication <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ヴァチェルカ氏 SO ありがとうございます!! 接続が可能とのことで安心しました。 ご親切なご返信のおかげで、mpr121センサ4個全てを接続することができました!! 私が直面している最後の問題は、「タッチボタンの数を最大 24 個まで拡張する」ことです。 各タッチセンサは 0 から 11 までの値を返します。 0-11、12-23、24-35、36-47 にするにはどうすればいいですか? ----------------------------------------------------------------------------------------------------------------------------------------------------- #include "SoftwareSerial.h" //#define defaultPatch 15 //악기 초기화 버튼 설정 악기번호 ソフトウェアシリアル mySerial(2, 3); //SW の機能 D3 MIDI 機能、D2 の機能 バイトノート = 0; //MIDI 연주될 ノート(음계) バイトリセットMIDI = 4; // VS1053 リセット バイトledPin = 13; //MIDI 트래픽 표시용 LED #include #include "Adafruit_MPR121.h" #ifndef _BV #define _BV(ビット) (1 << (ビット)) #endif // 1 つの I2Cバス に最大 4 つまで接続できますが、テストには 1 つで十分です。 Adafruit_MPR121 キャップ = Adafruit_MPR121(); Adafruit_MPR121 cap2 = Adafruit_MPR121(); Adafruit_MPR121 cap3 = Adafruit_MPR121(); Adafruit_MPR121 cap4 = Adafruit_MPR121(); // 最後にタッチされたピンを追跡します // SO ボタンが「放された」ことが分かる uint16_t 最後にタッチされた = 0; uint16_t currtouched = 0; uint16_t lasttouched2 = 0; uint16_t currtouched2 = 0; uint16_t lasttouched3 = 0; uint16_t currtouched3 = 0; uint16_t lasttouched4 = 0; uint16_t currtouched4 = 0; int btn[]={21, 23, 24, 26, 28, 29, 31, 33, 35, 36, 38, 40, 41、43、45、47、48、50、52、53、55、57、59、60、 62、64、65、67、69、71、72、74、76、77、79、81、 83、84、86、88、89、91、93、95、96、98、100、101}; バイト byteData; void セットアップ() { シリアル.begin(9600); mySerial.begin(9600); while (!Serial) { // leonardo/micro が高速に起動しないようにするために必要です。 遅延(10); } Serial.println("Adafruit MPR121 静電容量式タッチセンサテスト"); // デフォルトのアドレスは 0x5A です。3.3V に接続されている場合は 0x5B です。 // SDAに接続されている場合は0x5C、SCLに接続されている場合は0x5D if (!cap.begin(0x5A)) { シリアル.println("MPR121-A見つかりません。配線を確認してください。"); (1)の間 } シリアル.println("MPR121-A見つかった!"); // もし(!cap2.begin(0x5B)){ シリアル.println("MPR121-B見つかりません。配線を確認してください。"); (1)の間 } シリアル.println("MPR121-B見つかった!"); // if (!cap3.begin(0x5C)){ シリアル.println("MPR121-C見つかりません。配線を確認してください。"); (1)の間 } シリアル.println("MPR121-C見つかった!"); // もし(!cap4.begin(0x5D)){ シリアル.println("MPR121-D見つかりません。配線を確認してください。"); (1)の間 } シリアル.println("MPR121-D見つかった!"); //VS1053をリセットする pinMode(resetMIDI, OUTPUT); digitalWrite(resetMIDI, LOW); 遅延(100); digitalWrite(resetMIDI, HIGH); 遅延(100); // これはループ内にあるので、ボードをホットプラグできます // ホットプラグインが必要ない場合は、setup() に配置できます。 キャップの開始(0x5A); cap2.begin(0x5B); cap3.begin(0x5C); cap4.begin(0x5D); } void loop() { // 現在タッチされているパッドを取得します currtouched = cap.touched(); currtouched2 = cap2.touched(); currtouched3 = cap3.touched(); currtouched4 = cap4.touched(); (uint8_t i=0; i<48; i++) の場合 { // タッチされたが、以前はタッチされていなかった場合は警告! if ((currenttouched & _BV(i)) && !(lasttouched & _BV(i)) ) { Serial.print(i); Serial.println(" タッチされました"); // トーン(0, btn[i],100); noteOn(0, btn[i],100); //tone(ブザーピン、周波数[i]、330); } //2/////////////////////////////////////////////////// if ((currtouched2 & _BV(i)) && !(lasttouched2 & _BV(i)) ) { //センサがタッチされたら何かする Serial.print(i); Serial.println(" タッチされました"); noteOn(0, btn[i],100); } //3/////////////////////////////////////////////////// if ((currtouched3 & _BV(i)) && !(lasttouched3 & _BV(i)) ) { //センサがタッチされたら何かする Serial.print(i); Serial.println(" タッチされました"); noteOn(0, btn[i],100); } //4/////////////////////////////////////////////////// if ((currtouched4 & _BV(i)) && !(lasttouched4 & _BV(i)) ) { //センサがタッチされたら何かする Serial.print(i); Serial.println(" タッチされました"); noteOn(0, btn[i],100); } } // 状態をリセットする lasttouched = currtouched; 最後にタッチした2 = 現在タッチした2; lasttouched3 = currtouched3; 最後にタッチした4 = 現在タッチした4; 戻る; //*************** MIDI ループバック ******************// if(Serial.available()> 0) { byteData = Serial.read(); mySerial.write(バイトデータ); } } //MIDI ノートオン メッセージを送信します。ピアノの鍵盤を押すように //チャネルの範囲は0~15 void noteOn(バイトチャネル、バイトノート、バイトアタックベロシティ) { talkMIDI( (0x90 | チャネル), ノート, attack_velocity); } //MIDI ノートオフ メッセージを送信します。ピアノの鍵盤を放すように void noteOff(バイトチャネル、バイトノート、バイトリリースベロシティ) { talkMIDI( (0x80 | チャネル), ノート, release_velocity); } //MIDI ノートを再生します。cmd が 127 より大きいか、データ値が 127 より小さいかをチェックしません。 void talkMIDI(バイトコマンド、バイトデータ1、バイトデータ2) { digitalWrite(ledPin, HIGH); mySerial.write(コマンド); mySerial.write(データ1); // 一部のコマンドにはデータ バイトが 1 つしかありません。0xBn未満のすべてのコマンドは2つのデータバイトを持ちます //(ある意味: http://253.ccarh.org/handout/midiprotocol/) if( (コマンド & 0xF0) <= 0xB0) mySerial.write(data2); digitalWrite(ledPin, LOW); }   Re: 2 mpr121 sensors in one arduino -> serial communication <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ジンさん はい、同じ I2Cバス 上の 2 つの MPR121 センサ と通信して、タッチ ボタンの数を最大 24 個まで拡張できます。 実際には、ADDR ピンの接続に応じて、MPR121 に 4 つの I2C アドレスを割り当てCANます。   たとえば、1 つの MPR121 スレーブは、ADDR=VDD の場合に 7 ビットの I2C アドレス 0x5A (書き込みの場合は 0xB4、読み取りの場合は 0xB5 に変換されます) を持ち、もう 1 つの MPR121 スレーブは ADDR=GND の場合に 0x5B (書き込みの場合は 0xB6、読み取りの場合は 0xB7 に変換されます) を持ちます。 お役に立てれば幸いです! よろしくお願いいたします。 トーマス
查看全文
如何在 NTAG424 DNA 中启用 CMAC、UID、COUNTER 和 RAND? 我试图使用最新的 Android SDK 库来设置基于 AES 密钥的动态 URL,但我无法做到。 nxpnfcandroidlib-release-protected.aar 这是我的代码 override fun onNewIntent(intent: Intent) { Log.i("NFC", "Intent action: ${intent.action}") super.onNewIntent(intent) Log.i("MainActivity", "NFC tag discovered") val cardType = libInstance.getCardType(intent) Log.i("MainActivity", "Detected card type: $cardType") if (cardType == CardType.NTAG424DNA) { val ntag424DNA: INTAG424DNA = DESFireFactory.getInstance().getNTAG424DNA(libInstance.customModules) val reader: IReader = ntag424DNA.reader try { if (!reader.isConnected) { reader.connect() } ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME) Log.i("NFC", "ISO selected app by DF Name ✅") authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) creatingNDEFmessage(ntag424DNA) authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) changeFileSettings(ntag424DNA, 0x01) authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) ntag424DNA.setPICCConfiguration(true) Log.i("MainActivity", "✅ PICC Configuration updated to enable SDM globally.") authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) changeSDMFileSettings(ntag424DNA, 0x01) if (reader.isConnected) { reader.close() } } catch (e: Exception) { e.printStackTrace() } } } private fun creatingNDEFmessage(ntag424DNA: INTAG424DNA) { // 1. Creating URI NDEF message val msg = NdefMessageWrapper( NdefRecordWrapper( NdefRecordWrapper.TNF_ABSOLUTE_URI, "https://domain.com?uid=04BB38D2AA1191&ctr=0001&cmac=3ab665b76b795cb9bf76a17956cc9fb3&rand=422def08-8a1c-49c9-9138-434cde858faa".toByteArray( Charset.forName("US-ASCII") ), ByteArray(0), ByteArray(0) ) ) ntag424DNA.writeNDEF(msg); Log.i("MainActivity", "URI NDEF message written successful ✅") val ndefRead = ntag424DNA.readNDEF() Log.i("MainActivity", "Read URI NDEF message ${CustomModules.getUtility().dumpBytes(ndefRead.toByteArray())}") } private fun changeFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { // 3. Create NTAG 424 DNA file settings for E104 val fileSettings = NTAG424DNAFileSettings( MFPCard.CommunicationMode.Encrypted, // = 0x03 = Full ENC + CMAC (SUN) 0x0E.toByte(), // Read access = key slot 0x00 maybe 0x01 0x0E.toByte(), // Write access = always 0x0E.toByte(), // RW access = always 0x0E.toByte() // Change access = always ) Log.i("MainActivity", "Prepare for saving changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("NFC", "🔐 File settings updated $fileNumber") } private fun changeSDMFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { val fileSettings = ntag424DNA.getFileSettings(fileNumber); fileSettings.isSDMEnabled = true; fileSettings.isUIDMirroringEnabled = true; fileSettings.piccDataOffset = intTo2ByteArray(51) fileSettings.sdmMacOffset = intTo2ByteArray(51) fileSettings.sdmMacInputOffset = intTo2ByteArray(51) fileSettings.sdmReadCounterOffset = intTo2ByteArray(51) fileSettings.uidOffset = intTo2ByteArray(51) fileSettings.sdmAccessRights = byteArrayOf(0x00, 0x00) Log.i("MainActivity", "Prepare for saving SDM changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("NFC", "🔐 File settings updated: SUN CMAC enabled on $fileNumber") } private fun intTo2ByteArray(value: Int): ByteArray { return byteArrayOf( ((value shr 😎 and 0xFF).toByte(), (value and 0xFF).toByte() ) } 我知道偏移量与 URL 中的位置不匹配,但无论我做了什么更改,都还是会出现这个错误。看起来,由于某些原因,这些设置无法通过这种方法保存。 ntag424DNA.changeFileSettings(fileNumber, fileSettings) 错误信息如下 com.nxp.nfclib.exceptions.UsageException: Invalid Parameters! {Invalid Value for PICC Offset} 代码示例 Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 问题是由于错误的偏移值造成的。看来 ntag 保留了 21 个默认索引。现在,我们正试图更改 128 aes 密钥,但 changekey() 函数不起作用。 @UKCAS Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 嘿, 我正在关注这个话题来安装 JSON 数据,但它对我不起作用。这是我第一次与硬件打交道,因此工作更具挑战性。我使用的是恩智浦 Android 库和这里的示例 Android 应用程序: https://www.nxp.com/design/design-center/software/rfid-developer-resources/taplinx-software-development-kit-sdk:TAPLINX 以下是我在 Sample_Application_Android/src/main/java/com/nxp/sampletaplinx/WriteActivity.java 中的代码 public static byte[] intTo2ByteArray(int value) { return new byte[] { (byte) (value & 0xFF), // LSB (byte) ((value >> 8) & 0xFF), // middle byte (byte) ((value >> 16) & 0xFF) // MSB }; } private void tag424DNACardLogic(INTAG424DNA ntag424DNA) { byte[] KEY_AES128_DEFAULT = new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, }; byte[] NTAG424DNA_APP_NAME = {(byte) 0xD2, (byte) 0x76, 0x00, 0x00, (byte) 0x85, 0x01, 0x01}; byte[] data ={ 0x73, 0x75, 0x73, 0x68, 0x69, 0x6C }; mStringBuilder.append("\n\n"); int timeOut = 2000; try { ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME); KeyData aesKeyData = new KeyData(); Key keyDefault = new SecretKeySpec(KEY_AES128_DEFAULT, "AES"); aesKeyData.setKey(keyDefault); ntag424DNA.authenticateEV2First(0, aesKeyData, null); mStringBuilder.append(getString(R.string.Authentication_status_true)); mStringBuilder.append("\n\n"); ntag424DNA.setPICCConfiguration(true); String jsonTemplate = "{\"uuid\":\"00000000000000\",\"counter\":\"000000\",\"cmac\":\"0000000000000000\",\"domain1\":" + 1 + ",\"domain2\":" + 1 + "}"; byte[] jsonBytes = jsonTemplate.getBytes("UTF-8"); NTAG424DNAFileSettings fs = new NTAG424DNAFileSettings( CommunicationMode.Plain, // or MAC/ENC depending on your security (byte) 0x0E, // Read access: Key 0 (byte) 0x0E, // Write access: Key 0 (byte) 0x0E, // Read/Write: Key 0 (byte) 0x00 // Change access: Free ); byte[] type = "U".getBytes("US-ASCII"); fs.setSDMEnabled(true); fs.setUIDMirroringEnabled(true); fs.setSDMReadCounterEnabled(true); byte[] bytes = new byte[] { (byte)0xE0, (byte)0x00, (byte)0x00 }; fs.setSdmAccessRights(bytes); byte[] uuidOffset = intTo2ByteArray(8); fs.setUidOffset(uuidOffset); byte[] readCounterOffset = intTo2ByteArray(35); fs.setSdmReadCounterOffset(readCounterOffset); byte[] macOffset = intTo2ByteArray(51); fs.setSdmMacInputOffset(uuidOffset); fs.setSdmMacOffset(macOffset); ntag424DNA.changeFileSettings(FILE_NUMBER, fs); // Create NDEF record NdefRecordWrapper record = new NdefRecordWrapper( NdefRecordWrapper.TNF_WELL_KNOWN, type, new byte[0], // empty ID jsonBytes // payload (your JSON) ); // Wrap record into NDEF message NdefMessageWrapper msg = new NdefMessageWrapper(record); ntag424DNA.writeNDEF(msg); NxpLogUtils.save(); } catch (Exception e) { writeFailedMessage(); mStringBuilder.append(e.getMessage()); Log.i("MainActivity", "URI NDEF message written successful $msg " + e.getMessage() ); showMessage(mStringBuilder.toString(), PRINT); NxpLogUtils.save(); } } 如果有人能帮我解决这个问题,将是莫大的帮助 Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 谢谢您的帮助!你说得对,我的偏移值是错的。这就是我所做的更改,现在我可以保存设置了。 override fun onNewIntent(intent: Intent) { Log.i("NFC", "Intent action: ${intent.action}") super.onNewIntent(intent) Log.i("MainActivity", "NFC tag discovered") val cardType = libInstance.getCardType(intent) Log.i("MainActivity", "Detected card type: $cardType") if (cardType == CardType.NTAG424DNA) { val ntag424DNA: INTAG424DNA = DESFireFactory.getInstance().getNTAG424DNA(libInstance.customModules) val reader: IReader = ntag424DNA.reader try { if (!reader.isConnected) { reader.connect() } ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME) Log.i("NFC", "ISO selected app by DF Name ✅") authenticateTag(0x00, ntag424DNA, KEY_AES128_DEFAULT) creatingNDEFmessage(ntag424DNA) authenticateTag(0x00, ntag424DNA, KEY_AES128_DEFAULT) changeFileSettings(ntag424DNA, 0x02) if (reader.isConnected) { reader.close() } } catch (e: Exception) { Log.e("MainActivity", e.localizedMessage ?: "No Error Message"); e.printStackTrace() } } } private fun changeFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { // 3. Create NTAG 424 DNA file settings for E104 val fileSettings = NTAG424DNAFileSettings( MFPCard.CommunicationMode.Plain, // = 0x03 = Full ENC + CMAC (SUN) 0x0E.toByte(), // Read access = key slot 0x00 maybe 0x01 0x0E.toByte(), // Write access = always 0x0E.toByte(), // RW access = always 0x00.toByte() // Change access = always ) fileSettings.isSDMEnabled = true fileSettings.isUIDMirroringEnabled = true fileSettings.isSDMReadCounterEnabled = true fileSettings.sdmAccessRights = byteArrayOf(0xfe.toByte(), 0xe1.toByte()) fileSettings.uidOffset = byteArrayOf(0x1A, 0x00, 0x00) fileSettings.sdmReadCounterOffset = byteArrayOf(0x2d, 0x00, 0x00) fileSettings.sdmMacOffset = byteArrayOf(0x39, 0x00, 0x00) fileSettings.sdmMacInputOffset = byteArrayOf(0x39, 0x00, 0x00) Log.i("MainActivity", "Prepare for saving changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("MainActivity", "🔐 File settings updated $fileNumber") } private fun creatingNDEFmessage(ntag424DNA: INTAG424DNA) { // 1. Creating URI NDEF message val payload = byteArrayOf(0x04) + "noexample.xxxx?uid=00000000000000&ctr=000000&cmac=0000000000000000".toByteArray() val msg = NdefMessageWrapper( NdefRecordWrapper( NdefRecordWrapper.TNF_WELL_KNOWN, "U".toByteArray(StandardCharsets.US_ASCII), ByteArray(0), payload ) ) ntag424DNA.writeNDEF(msg); Log.i("MainActivity", "URI NDEF message written successful ✅") val ndefRead = ntag424DNA.readNDEF() Log.i("MainActivity", "Read URI NDEF message ${CustomModules.getUtility().dumpBytes(ndefRead.toByteArray())}") } Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 亲爱的洛基2号 请查看 jimmyvhan 提供的文件和数据表。 你们的偏移量重叠了,而数据手册不允许这样做。 考虑您所需的 URL。存放 NFCCounter 的空间太少了,即 3 字节。因此,以下设置适合更正后的 URL。 https://domain.com?uid=04BB38D2AA1191&ctr=000001&cmac=3ab665b76b795cb9bf76a17956cc9fb3&rand=422def08-8a1c-49c9-9138-434cde858faa 您应将这些参数用于 SDM 配置。您还可以决定 CMAC 计算的输入数据。本例以 UIDOffset 为起点。 fileSettings.sdmMacOffset = intTo2ByteArray(53) fileSettings.sdmMacInputOffset = intTo2ByteArray(22) fileSettings.sdmReadCounterOffset = intTo2ByteArray(41) fileSettings.uidOffset = intTo2ByteArray(22) 致以最崇高的敬意 TapLinx 团队 Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 本文件可能对您有用。 NTAG 424 DNA 和 NTAG 424 DNA TagTamper 功能和提示
查看全文
S32G A53 QNX 上的 PFE 故障     您好,恩智浦专家 我们有一个自定义板要在上面运行 QNX 和 PFE 驱动程序。但我们遇到了以下问题,希望 PFE 专家帮助分析一下。     软件信息: PFE QNX 驱动程序版本:1.8.0 PFE FW 版本: 1.11.0 QNX SDP 版本: 7.1.0 QNX S32G399A 的 电路板支持包 版本:bsp_nxp-s32G-rdb3_br-710_be-710_be-710_svn996606_jbn10   硬件信息: 我们和恩智浦 S32G399ARDB3 EVN 板之间的硬件区别在于,DDR 已更改为 2GB,而且我们已经在 Linux 中对其进行了调整,而且 pfe 以太网驱动程序是正常的。 变化如下:           1。images/s32g399a-rdb.版本 文件中的更改,   2。src\ hardware\ startup\ 板\ s32g\ s32g399a-rdb\ s32g_init_raminfo.c 中的变化文件:     3.其他无关紧要的变化,与 PFE 驱动程序无关。       我的测试命令是: # slog2info -c # slog2info -w& # io-pkt-v6-hc-p tcpip pkt_typed_mem=pfe_ddr-d /proc/boot/devnp-pfe-2.so class_fw=/proc/boot/boot/devnp-boot/boot=/proc/boot/devnp-boot-2.so class_fw=/proc/boot/devnp-boot/boot=/proc/boot/devnp-boot=/   但是,运行后出现了错误信息。日志在此。 -------------------Appendix------------------     注意:在 SCMI 代理 RESET 命令期间发现已启用的时钟列表: 注意:linflex_lin 注意: usdhc_core board_smp_num_cpu: 8 个内核 MMU:16 位 ASID 40 位 PA TCR_EL1=b5183519 ARM GIC-500 r1p1,已检测到 arch v3.0 board_smp_num_cpu: 8 个内核 board_smp_num_cpu: 8 个内核 无 SPI 内部信息。为 32 -> 575 向量添加默认条目,OK cpu0: MPIDR=80000000 cpu0:MIDR=410fd034 Cortex-A53 r0p4 cpu0: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu0:CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu0:L1 缓存 32K linesz=64 set/way=256/2 cpu0:L1 缓存 32K linesz=64 set/way=128/4 cpu0:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_num_cpu: 8 个内核   A53 核心时钟:1000MHz DDR 时钟:800MHz SERDES 时钟:2000MHz LINFLEXD 时钟:125 兆赫 GMAC TS 时钟:48 兆赫 SPI 时钟:48MHz QSPI 时钟:800MHz SDHC 时钟:800MHz   加载 IFS...解压...完成 board_smp_start: cpu_cluster_id:0, cpu_id:1 注意:S32 TF-A:s32_pwr_domain_on:启动内核 1 (0) 跑步 cpu1: MPIDR=80000001 cpu1:MIDR=410fd034 Cortex-A53 r0p4 cpu1: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu1: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu1:L1 高速缓存 32K linesz=64 set/way=256/2 cpu1:L1 缓存 32K linesz=64 set/way=128/4 cpu1:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id:0, cpu_id: 2 NOTTCE: S32 T TA: s323pw_pdomrin_on: bootingnup cor 2u 0) 宁 cpu2: MPIDR=80000002 cpu2:MIDR=410fd034 Cortex-A53 r0p4 cpu2: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu2: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu2:L1 缓存 32K linesz=64 set/way=256/2 cpu2:L1 缓存 32K linesz=64 set/way=128/4 cpu2:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id:0, cpu_id:3 ngTice:SS32TT-A:: 32_pwr_rodain_on:启动核心 (30n) cpu3: MPIDR=80000003 cpu3:MIDR=410fd034 Cortex-A53 r0p4 cpu3: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu3: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu3:L1 缓存 32K linesz=64 set/way=256/2 cpu3:L1 缓存 32K linesz=64 set/way=128/4 cpu3:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id:1, cpu_id:0 注意:S32 TF-A:s32_pwr_domain_on:启动核心 4 (0) 注意:S32 TF-A:s32_pwr_domain_on_finish:CPU 4 正在运行 cpu4: MPIDR=80000100 cpu4:MIDR=410fd034 Cortex-A53 r0p4 cpu4: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu4: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu4:L1 缓存 32K linesz=64 set/way=256/2 cpu4:L1 Dcache 32K linesz=64 set/way=128/4 cpu4:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id:1, cpu_id:1 注意:S32 TF-A:s32_pwr_domain_on:启动内核 5 (0) cpu 5 运行 cpu5: MPIDR=80000101 cpu5:MIDR=410fd034 Cortex-A53 r0p4 cpu5: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu5: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu5:L1 高速缓存 32K linesz=64 set/way=256/2 cpu5:L1 缓存 32K linesz=64 set/way=128/4 cpu5:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id:1, cpu_id: 2 注意:S32 TF-A:s32_pwr_domain_on:启动内核 6 (0) 宁 cpu6: MPIDR=80000102 cpu6:MIDR=410fd034 Cortex-A53 r0p4 cpu6: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu6: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu6:L1 高速缓存 32K linesz=64 set/way=256/2 cpu6:L1 缓存 32K linesz=64 set/way=128/4 cpu6:L2 统一 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id:1, cpu_id:3 注意:S32 TF-A:s32_pwr_domain_on:启动核心 7 (0) 7 运行 cpu7: MPIDR=80000103 cpu7:MIDR=410fd034 Cortex-A53 r0p4 cpu7: CWG=4 ERG=4 Dminline=4 Iminline=4 VIPT cpu7: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1 cpu7:L1 高速缓存 32K linesz=64 set/way=256/2 cpu7:L1 缓存 32K linesz=64 set/way=128/4 cpu7:L2 统一 1024K linesz=64 set/way=1024/16   系统页面位于 phys:00000000a0010000 user:ffffff8040315000 kern:ffffff8040311000 在 vffffff8060097300 处开始下一个程序 时钟周期样本: 0 62957977 1 62957977 2 62957978 3 62957977 4 62957977 5 62957977 6 62957977 7 62957977 所有时钟周期偏移在公差范围内 欢迎使用 QNX Neutrino 7.1.0 版在恩智浦 S32G399A RDB 板上!! 启动看门狗... 启动串行驱动程序 ... 启动网络驱动程序 (/dev/socket)... 启动 SPI 驱动程序 (/dev/spi0,1,2,3,4,5)... 启动 I2C 0/1/2/3/4 驱动程序 (/dev/i2c0,1,2,3,4)... 启动 USDHC0 存储卡驱动程序... Path=Starting CAN driver... 0 - imx target=0 lun=0 Direct-Access(0) - SDMMC: AAM20E Rev: 1.0 数量 数量 数量 # slog2info -c   进程 4117 (slog2info) 已退出,状态=0。 ghccu# slog2info -w& [1] 12309 random.4 low 0 -----UNSYNC----- 随机.4 高 0 -----UNSYNC----- Jan 01 00:00:00.022 控制台.3 0 -----ONLINE----- console.3 out 0 -----UNSYNC----- Jan 01 00:00:00.027 随机.4 0 -----ONLINE----- random.4 default 0 -----UNSYNC----- Jan 01 00:00:00.028 random.4..0 0 -----ONLINE----- random.4..0 slog 0 -----UNSYNC----- Jan 01 00:00:00.050 devc_serlinflexd.7 0 -----ONLINE----- devc_serlinflexd.7 slog 0 -----UNSYNC----- Jan 01 00:00:00.055 spi_master.8 0 -----ONLINE----- spi_master.8 normal 0 -----UNSYNC----- Jan 01 00:00:00.059 spi_master.9 0 -----ONLINE----- spi_master.9 normal 0 -----UNSYNC----- Jan 01 00:00:00.063 spi_master.10 0 -----ONLINE----- spi_master.10 normal 0 -----UNSYNC----- Jan 01 00:00:00.067 spi_master.11 0 -----ONLINE----- spi_master.11 normal 0 -----UNSYNC----- Jan 01 00:00:00.088 devb_sdmmc_mx8x.17 0 -----ONLINE----- devb_sdmmc_mx8x.17 slog 0 -----UNSYNC----- Jan 01 00:00:04.268 qconn.20 0 -----ONLINE----- qconn.20 slog 0 -----UNSYNC----- 数量 数量 数量 # io-pkt-v6-hc-p tcpip pkt_typed_mem=pfe_ddr-d /proc/boot/devnp-pfe-2.so class_fw=/proc/boot/boot/devnp-boot/boot=/proc/boot/devnp-boot-2.so class_fw=/proc/boot/devnp-boot/boot=/proc/boot/devnp-boot=/ # Jan 01 00:00:14.060 iopkt.16408 0 -----ONLINE----- Jan 01 00:00:14.060 iopkt.16408 main_buffer* 0 detect_armv8ce_hw:支持 armv8ce! Jan 01 00:00:14.061 iopkt.16408 main_buffer 0 tcpip 启动 Jan 01 00:00:14.062 iopkt.16408 main_buffer 0 smmu 支持已禁用 Jan 01 00:00:14.063 iopkt.16408 main_buffer 0 正在初始化 IPsec... Jan 01 00:00:14.063 iopkt.16408 main_buffer 0 done   Jan 01 00:00:14.064 iopkt.16408 main_buffer 0 IPsec:已初始化的网络安全关联处理。   Jan 01 00:00:14.067 iopkt.16408 main_buffer 0 /proc/boot/devnp-pfe-2.so class_fw=/proc/boot/s32g_pfe_class.fw,util_fw=/proc/boot/s32g_pfe_util.fw,util_fw=/proc/boot/s32g_pfe_util.fw Jan 01 00:00:14.068 io_pkt_v6_hc.16408 0 -----ONLINE----- Jan 01 00:00:14.068 io_pkt_v6_hc.16408 slog* 0 INF[src/pfe_drv.c:1346]:版本信息 驱动程序版本: 1.8.0 驱动程序提交哈希值:57b6eefdb35cbff7a43ecfbdca3334760b1d0553 pfe_cfg_multi_instance_support: 0 pfe_cfg_local_if:6 pfe_cfg_master_if:6 pfe_cfg_sc_hif:1 pfe_cfg_hif_ring_length: 256 pfe_cfg_pfe0_promisc: 1 pfe_cfg_pfe1_promisc: 1 pfe_cfg_pfe2_promisc: 1     Jan 01 00:00:14.068 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1353]:--- 安全 IRQ 已启用。不允许使用 InterrupAttach() 或 InterrupAttach_r()。   Jan 01 00:00:14.068 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_fw.c:94]:读取 45724 字节   Jan 01 00:00:14.068 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_fw.c:100]:加载的固件文件:/proc/启动/s32g_pfe_class.fw   Jan 01 00:00:14.068 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_fw.c:94]:读取 23352 字节   Jan 01 00:00:14.069 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_fw.c:100]:加载的固件文件:/proc/启动/s32g_pfe_util.fw   Jan 01 00:00:14.069 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1449]:未找到 pfe0/EMAC0 的 MII 模式配置。使用 SGMII。   Jan 01 00:00:14.069 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1449]:未找到 pfe1/EMAC1 的 MII 模式配置。使用 SGMII。   Jan 01 00:00:14.069 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1449]:未找到 pfe2/EMAC2 的 MII 模式配置。使用 SGMII。   Jan 01 00:00:14.069 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1467]:发出 PFE 外设 RESET...   Jan 01 00:00:14.179 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1468]:PFE RESET 正常。   Jan 01 00:00:14.179 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2826]:PFE CBUS p0x46000000 已映射 @ v0x1e2a574000(0x1000000 字节)   Jan 01 00:00:14.179 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2831]:硬件版本 0x101   Jan 01 00:00:14.179 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_hw_feature.c:95]:硅 S32G3   Jan 01 00:00:14.179 io_pkt_v6_hc.16408 slog 0 WRN[hw/s32g/pfe_platform_master.c:2843]:禁用故障停机模式   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2093]:PFE_ERRORS:已创建奇偶校验实例   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2108]:PFE_ERRORS:已创建看门狗实例   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2124]:pfe_errors: 已创建总线错误实例   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2137]:PFE_ERRORS:已创建 FW 故障停止实例   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2150]:PFE_ERRORS:已创建主机故障停止实例   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2163]:PFE_ERRORS:创建的停止实例失败   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:2176]:PFE_ERRORS:ECC Err 实例已创建   Jan 01 00:00:14.254 io_pkt_v6_hc.16408 slog 0 INF[hw/s32g/pfe_platform_master.c:1097]:BMU1 缓冲区基数: p0xc0000000   Jan 01 00:00:14.255 io_pkt_v6_hc.16408 slog 0 ERR[src/oal_mm_qnx.c:98]: (DRIVER) event 1 - Driver runtime error: mmap64() failed: 1   Jan 01 00:00:14.255 io_pkt_v6_hc.16408 slog 0 ERR[src/oal_mm_qnx.c:171]: (DRIVER) event 1 - Driver runtime error:无法获取内存块   Jan 01 00:00:14.255 io_pkt_v6_hc.16408 slog 0 ERR[hw/s32g/pfe_platform_master.c:1125]:(DRIVER) 事件 1 - 驱动程序运行时出错:无法获取 BMU2 池内存   Jan 01 00:00:14.256 io_pkt_v6_hc.16408 slog 0 ERR[src/pfe_drv.c:1529]:(DRIVER) 事件 1 - 驱动程序运行时出错:无法初始化平台   Jan 01 00:00:14.257 iopkt.16408 main_buffer 0 无法启动 /proc/boot/devnp-pfe-2.so:没有这样的设备   Jan 01 00:00:14.257 io_pkt_v6_hc.16408 slog 0 INF[src/pfe_drv.c:1302]:PFE 输入失败,PFE 驱动程序终止     数量 数量 数量 数量 数量 数量     Re: PFE on S32G A53 QNX ERROR 你好,@桑德尔伍德 我对迟复感到非常抱歉。 不确定问题是否已经解决? 请问您的 uboot 是否设置了环境变量 skip_scmi_reset_agent? 如果没有,请尝试设置如下内容:"setenv skip_scmi_reset_agent '1'" BR 切宁   Re: PFE on S32G A53 QNX ERROR 你好,@桑德尔伍德 感谢您的回复。 1.我建议查看 PFE 驱动程序版本代码包中包含的 " PFE_QNX_DRV_IntegrationManual.pdf ",并确保每个步骤(构建、运行驱动程序)都是正确的。 2.如果 DTB 文件在 Linux 中运行良好,那么 QNX 中的原始文件也应替换为该文件。 你能不能再试一次,并告诉我测试结果。 BR 切宁 Re: PFE on S32G A53 QNX ERROR 你好,@桑德尔伍德 感谢您的回复。 是的,我现在明白了。 我们会进行调查,有结果后再回复您。 BR 切宁 Re: PFE on S32G A53 QNX ERROR 1.pfe DDR 的位置不能使用 NXP 手册中提供的示例,必须更改为空闲位置,以防止与预留内存重叠。 2. 我还没做任何动态更改。我的运行命令是:io-pkt-v6-hc-p tcpip pkt_typed_mem=pfe_ddr-d /proc/boot/devnp-pfe-2.so pfe0_link=1000-1-3,pfe0_mac=025556000050,class_fw=/proc/boot/s32g_pfe_class. class.so pfe0_link=1000-1-3,pfe0_mac=025556000050,class_fw=/proc/boot/fw,util_fw=/proc/boot/ s32g_pfe_util.fw 我我没有做任何动态更改,也没有修改 uboot 的环境变量。Linux 和 QNX 使用相同的 uboot 映像。所以,我的理解是,QNX 上 Serdes 的配置应该与 Linux 相同,对吗? Re: PFE on S32G A53 QNX ERROR 你好,@桑德尔伍德 很高兴 ddr 问题得到了解决,您能告诉我们原因吗? 对于所提到的 ping 问题,您是否提到了下面的驱动程序限制: BR 切宁 Re: PFE on S32G A53 QNX ERROR 你好, 我们已经解决了 ddr 错误,但在 ping 时可能会出现新问题。 我们板中的 pfe0 通过 MAC-TO-MAC(SGMII 模式)直接连接到外部交换机。在 Linux 环境中,该链接是正常的,可以与外部环境正常通信,如 ping 正常。但用当前的 QNX 取代 Linux 后,Ping 问题就会出现。 在 Linux 中,我们更改了设备树并将 pfe0 配置为修复 sgmii 模式。我怀疑与此有关,但不知道如何在 QNX 中进行配置。 日志请见附件。 Re: PFE on S32G A53 QNX ERROR 160 是十六进制 0xa0,看来 pfe_ddr 是正常的 # pidin sys=asinfo Header size=0x00000108, Total Size=0x00001050, #Cpu=8, Type=257 Section:asinfo offset:0x00000b90 size:0x00000200 elsize:0x00000020 0000) 000000000000-0000ffffffffff o:ffff a:0010 p:100 c:0 n:/memory 0020) 000000000000-00000000ffffffff o:0000 a:0010 p:100 c:0 n:/memory/below4G 0040) 0000000080000000-00000000ffffff o:0020 a:0017 p:100 c:0 n:/memory/below4G/ram 0060) 0000000880000000-00000008dffffffff o:0000 a:0017 p:100 c:0 n:/memory/ram 0080) 00000000ff800000-00000000ff83afff o:0040 a:0005 p:100 c:0 n:/memory/below4G/ram/atf 00a0) 0000000080000000-0000000083ffffff o:0040 a:0007 p:100 c:0 n:/memory/below4G/ram/pfe_ddr 00c0) 0000000050800000-000000005080ffff o:0000 a:0003 p:100 c:0 n:/memory/gicd 00e0) 0000000050900000-00000000509fffff o:0000 a:0003 p:100 c:0 n:/memory/gicr 0100) 0000000088000080-0000000088007fff o:0040 a:0005 p:100 c:0 n:/memory/below4G/ram/fdt 0120) 00000000800d10a8-00000000815fa8b3 o:0000 a:0005 p:100 c:0 n:/memory/imagefs 0140) 0000000080080fa0-00000000800d10a7 o:0000 a:0007 p:100 c:0 n:/memory/startup 0160) 00000000800d10a8-00000000815fa8b3 o:0000 a:0007 p:100 c:0 n:/memory/bootram 0180) 00000000a0000000-00000000a0007fff o:0040 a:0007 p:100 c:0 n:/memory/below4G/ram/sysram 01a0) 00000000a0014000-00000000ff7fffff o:0040 a:0007 p:100 c:0 n:/memory/below4G/ram/sysram 01c0) 00000000ff83b000-00000000ffffffffff o:0040 a:0007 p:100 c:0 n:/memory/below4G/ram/sysram 01e0) 0000000880000000-00000008dd5e2fff o:0060 a:0007 p:100 c:0 n:/memory/ram/sysram Re: PFE on S32G A53 QNX ERROR 你好,@陈 感谢您的回复。返回代码请参见日志。 BR 檀木 Re: PFE on S32G A53 QNX ERROR 你好,@桑德尔伍德 谢谢你的帖子。 似乎内存映射不正确,请问是否有日志显示 as_add_containing() 调用成功? BR 切宁
查看全文
NTAG424 DNA で CMAC、UID、COUNTER、RAND を有効にするにはどうすればいいですか? 最新の Android SDKs ライブラリを使用して、AES キーに基づいて動的 URL を設定しようとしていますが、できません。 nxpnfcandroidlib-release-protected.aar これは私のコードです override fun onNewIntent(intent: Intent) { Log.i("NFC", "Intent action: ${intent.action}") super.onNewIntent(intent) Log.i("MainActivity", "NFC tag discovered") val cardType = libInstance.getCardType(intent) Log.i("MainActivity", "Detected card type: $cardType") if (cardType == CardType.NTAG424DNA) { val ntag424DNA: INTAG424DNA = DESFireFactory.getInstance().getNTAG424DNA(libInstance.customModules) val reader: IReader = ntag424DNA.reader try { if (!reader.isConnected) { reader.connect() } ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME) Log.i("NFC", "ISO selected app by DF Name ✅") authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) creatingNDEFmessage(ntag424DNA) authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) changeFileSettings(ntag424DNA, 0x01) authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) ntag424DNA.setPICCConfiguration(true) Log.i("MainActivity", "✅ PICC Configuration updated to enable SDM globally.") authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) changeSDMFileSettings(ntag424DNA, 0x01) if (reader.isConnected) { reader.close() } } catch (e: Exception) { e.printStackTrace() } } } private fun creatingNDEFmessage(ntag424DNA: INTAG424DNA) { // 1. Creating URI NDEF message val msg = NdefMessageWrapper( NdefRecordWrapper( NdefRecordWrapper.TNF_ABSOLUTE_URI, "https://domain.com?uid=04BB38D2AA1191&ctr=0001&cmac=3ab665b76b795cb9bf76a17956cc9fb3&rand=422def08-8a1c-49c9-9138-434cde858faa".toByteArray( Charset.forName("US-ASCII") ), ByteArray(0), ByteArray(0) ) ) ntag424DNA.writeNDEF(msg); Log.i("MainActivity", "URI NDEF message written successful ✅") val ndefRead = ntag424DNA.readNDEF() Log.i("MainActivity", "Read URI NDEF message ${CustomModules.getUtility().dumpBytes(ndefRead.toByteArray())}") } private fun changeFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { // 3. Create NTAG 424 DNA file settings for E104 val fileSettings = NTAG424DNAFileSettings( MFPCard.CommunicationMode.Encrypted, // = 0x03 = Full ENC + CMAC (SUN) 0x0E.toByte(), // Read access = key slot 0x00 maybe 0x01 0x0E.toByte(), // Write access = always 0x0E.toByte(), // RW access = always 0x0E.toByte() // Change access = always ) Log.i("MainActivity", "Prepare for saving changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("NFC", "🔐 File settings updated $fileNumber") } private fun changeSDMFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { val fileSettings = ntag424DNA.getFileSettings(fileNumber); fileSettings.isSDMEnabled = true; fileSettings.isUIDMirroringEnabled = true; fileSettings.piccDataOffset = intTo2ByteArray(51) fileSettings.sdmMacOffset = intTo2ByteArray(51) fileSettings.sdmMacInputOffset = intTo2ByteArray(51) fileSettings.sdmReadCounterOffset = intTo2ByteArray(51) fileSettings.uidOffset = intTo2ByteArray(51) fileSettings.sdmAccessRights = byteArrayOf(0x00, 0x00) Log.i("MainActivity", "Prepare for saving SDM changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("NFC", "🔐 File settings updated: SUN CMAC enabled on $fileNumber") } private fun intTo2ByteArray(value: Int): ByteArray { return byteArrayOf( ((value shr 😎 and 0xFF).toByte(), (value and 0xFF).toByte() ) } オフセット番号が URL 内のポジショニングと一致しないことはわかっていますが、何を変更してもこのエラーが発生します。何らかの理由で、この方法ではこれらの設定を保存できないようです。 ntag424DNA.changeFileSettings(fileNumber, fileSettings) これはエラーメッセージです com.nxp.nfclib.exceptions.UsageException: Invalid Parameters! {Invalid Value for PICC Offset} コード・サンプル Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? この問題はオフセット値が間違っているために発生しました。ntag は 21 のデフォルト インデックスを予約しているようです。今、ファクトリー128 AESキーを変更しようとしていますが、changekey()関数は機能しませんでした。 @ukcas Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? ちょっと、そこ、 このThreadに従って JSON データを設定していますが、うまくいきません。ハードウェアを扱うのは初めてなので、非常に困難になっています。私は、NXP Android ライブラリと、ここからのサンプル Android アプリケーションを使用しています: https://www.nxp.com/design/design-center/software/rfid-developer-resources/taplinx-software-development-kit-sdk:TAPLINX 以下はSample_Application_Android/src/main/java/com/nxp/sampletaplinx/WriteActivity.java内のコードです。 public static byte[] intTo2ByteArray(int value) { return new byte[] { (byte) (value & 0xFF), // LSB (byte) ((value >> 8) & 0xFF), // middle byte (byte) ((value >> 16) & 0xFF) // MSB }; } private void tag424DNACardLogic(INTAG424DNA ntag424DNA) { byte[] KEY_AES128_DEFAULT = new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, }; byte[] NTAG424DNA_APP_NAME = {(byte) 0xD2, (byte) 0x76, 0x00, 0x00, (byte) 0x85, 0x01, 0x01}; byte[] data ={ 0x73, 0x75, 0x73, 0x68, 0x69, 0x6C }; mStringBuilder.append("\n\n"); int timeOut = 2000; try { ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME); KeyData aesKeyData = new KeyData(); Key keyDefault = new SecretKeySpec(KEY_AES128_DEFAULT, "AES"); aesKeyData.setKey(keyDefault); ntag424DNA.authenticateEV2First(0, aesKeyData, null); mStringBuilder.append(getString(R.string.Authentication_status_true)); mStringBuilder.append("\n\n"); ntag424DNA.setPICCConfiguration(true); String jsonTemplate = "{\"uuid\":\"00000000000000\",\"counter\":\"000000\",\"cmac\":\"0000000000000000\",\"domain1\":" + 1 + ",\"domain2\":" + 1 + "}"; byte[] jsonBytes = jsonTemplate.getBytes("UTF-8"); NTAG424DNAFileSettings fs = new NTAG424DNAFileSettings( CommunicationMode.Plain, // or MAC/ENC depending on your security (byte) 0x0E, // Read access: Key 0 (byte) 0x0E, // Write access: Key 0 (byte) 0x0E, // Read/Write: Key 0 (byte) 0x00 // Change access: Free ); byte[] type = "U".getBytes("US-ASCII"); fs.setSDMEnabled(true); fs.setUIDMirroringEnabled(true); fs.setSDMReadCounterEnabled(true); byte[] bytes = new byte[] { (byte)0xE0, (byte)0x00, (byte)0x00 }; fs.setSdmAccessRights(bytes); byte[] uuidOffset = intTo2ByteArray(8); fs.setUidOffset(uuidOffset); byte[] readCounterOffset = intTo2ByteArray(35); fs.setSdmReadCounterOffset(readCounterOffset); byte[] macOffset = intTo2ByteArray(51); fs.setSdmMacInputOffset(uuidOffset); fs.setSdmMacOffset(macOffset); ntag424DNA.changeFileSettings(FILE_NUMBER, fs); // Create NDEF record NdefRecordWrapper record = new NdefRecordWrapper( NdefRecordWrapper.TNF_WELL_KNOWN, type, new byte[0], // empty ID jsonBytes // payload (your JSON) ); // Wrap record into NDEF message NdefMessageWrapper msg = new NdefMessageWrapper(record); ntag424DNA.writeNDEF(msg); NxpLogUtils.save(); } catch (Exception e) { writeFailedMessage(); mStringBuilder.append(e.getMessage()); Log.i("MainActivity", "URI NDEF message written successful $msg " + e.getMessage() ); showMessage(mStringBuilder.toString(), PRINT); NxpLogUtils.save(); } } 誰かがこれを手伝ってCANととても助かります Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 助けてくれてありがとう!私のオフセットの値が間違っているというのはその通りです。変更した内容はこれで、設定を保存CANようになりました。 override fun onNewIntent(intent: Intent) { Log.i("NFC", "Intent action: ${intent.action}") super.onNewIntent(intent) Log.i("MainActivity", "NFC tag discovered") val cardType = libInstance.getCardType(intent) Log.i("MainActivity", "Detected card type: $cardType") if (cardType == CardType.NTAG424DNA) { val ntag424DNA: INTAG424DNA = DESFireFactory.getInstance().getNTAG424DNA(libInstance.customModules) val reader: IReader = ntag424DNA.reader try { if (!reader.isConnected) { reader.connect() } ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME) Log.i("NFC", "ISO selected app by DF Name ✅") authenticateTag(0x00, ntag424DNA, KEY_AES128_DEFAULT) creatingNDEFmessage(ntag424DNA) authenticateTag(0x00, ntag424DNA, KEY_AES128_DEFAULT) changeFileSettings(ntag424DNA, 0x02) if (reader.isConnected) { reader.close() } } catch (e: Exception) { Log.e("MainActivity", e.localizedMessage ?: "No Error Message"); e.printStackTrace() } } } private fun changeFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { // 3. Create NTAG 424 DNA file settings for E104 val fileSettings = NTAG424DNAFileSettings( MFPCard.CommunicationMode.Plain, // = 0x03 = Full ENC + CMAC (SUN) 0x0E.toByte(), // Read access = key slot 0x00 maybe 0x01 0x0E.toByte(), // Write access = always 0x0E.toByte(), // RW access = always 0x00.toByte() // Change access = always ) fileSettings.isSDMEnabled = true fileSettings.isUIDMirroringEnabled = true fileSettings.isSDMReadCounterEnabled = true fileSettings.sdmAccessRights = byteArrayOf(0xfe.toByte(), 0xe1.toByte()) fileSettings.uidOffset = byteArrayOf(0x1A, 0x00, 0x00) fileSettings.sdmReadCounterOffset = byteArrayOf(0x2d, 0x00, 0x00) fileSettings.sdmMacOffset = byteArrayOf(0x39, 0x00, 0x00) fileSettings.sdmMacInputOffset = byteArrayOf(0x39, 0x00, 0x00) Log.i("MainActivity", "Prepare for saving changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("MainActivity", "🔐 File settings updated $fileNumber") } private fun creatingNDEFmessage(ntag424DNA: INTAG424DNA) { // 1. Creating URI NDEF message val payload = byteArrayOf(0x04) + "noexample.xxxx?uid=00000000000000&ctr=000000&cmac=0000000000000000".toByteArray() val msg = NdefMessageWrapper( NdefRecordWrapper( NdefRecordWrapper.TNF_WELL_KNOWN, "U".toByteArray(StandardCharsets.US_ASCII), ByteArray(0), payload ) ) ntag424DNA.writeNDEF(msg); Log.i("MainActivity", "URI NDEF message written successful ✅") val ndefRead = ntag424DNA.readNDEF() Log.i("MainActivity", "Read URI NDEF message ${CustomModules.getUtility().dumpBytes(ndefRead.toByteArray())}") } Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 親愛なるロッキー2様 jimmyvhan が参照しているドキュメントとデータシートを確認してください。 オフセットが重複していますが、これはデータシートでは許可されていません。 ご希望のURLを検討中です。NFCCounter のスペースが 3 バイトと少なすぎます。SO、以下の設定は修正された URL に適しています。 https://domain.com?uid=04BB38D2AA1191&ctr=000001&cmac=3ab665b76b795cb9bf76a17956cc9fb3&rand=422def08-8a1c-49c9-9138-434cde858faa SDM 構成にはこれらのパラメータを使用する必要があります。CMAC 計算のための入力データも決定します。この例では、UIDOffset を出発点として使用しました。 fileSettings.sdmMacOffset = intTo2ByteArray(53) fileSettings.sdmMacInputOffset = intTo2ByteArray(22) fileSettings.sdmReadCounterOffset = intTo2ByteArray(41) fileSettings.uidOffset = intTo2ByteArray(22) よろしくお願いします、 TapLinxチーム Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? この文書はあなたにとって役に立つかもしれません。 NTAG 424 DNAとNTAG 424 DNA TagTamperの機能とヒント
查看全文
NTAG424 DNA で CMAC、UID、COUNTER、RAND を有効にするにはどうすればいいですか? 最新の Android SDKs ライブラリを使用して、AES キーに基づいて動的 URL を設定しようとしていますが、できません。 nxpnfcandroidlib-release-protected.aar これは私のコードです override fun onNewIntent(intent: Intent) { Log.i("NFC", "Intent action: ${intent.action}") super.onNewIntent(intent) Log.i("MainActivity", "NFC tag discovered") val cardType = libInstance.getCardType(intent) Log.i("MainActivity", "Detected card type: $cardType") if (cardType == CardType.NTAG424DNA) { val ntag424DNA: INTAG424DNA = DESFireFactory.getInstance().getNTAG424DNA(libInstance.customModules) val reader: IReader = ntag424DNA.reader try { if (!reader.isConnected) { reader.connect() } ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME) Log.i("NFC", "ISO selected app by DF Name ✅") authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) creatingNDEFmessage(ntag424DNA) authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) changeFileSettings(ntag424DNA, 0x01) authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) ntag424DNA.setPICCConfiguration(true) Log.i("MainActivity", "✅ PICC Configuration updated to enable SDM globally.") authenticateTag(ntag424DNA, KEY_AES128_DEFAULT) changeSDMFileSettings(ntag424DNA, 0x01) if (reader.isConnected) { reader.close() } } catch (e: Exception) { e.printStackTrace() } } } private fun creatingNDEFmessage(ntag424DNA: INTAG424DNA) { // 1. Creating URI NDEF message val msg = NdefMessageWrapper( NdefRecordWrapper( NdefRecordWrapper.TNF_ABSOLUTE_URI, "https://domain.com?uid=04BB38D2AA1191&ctr=0001&cmac=3ab665b76b795cb9bf76a17956cc9fb3&rand=422def08-8a1c-49c9-9138-434cde858faa".toByteArray( Charset.forName("US-ASCII") ), ByteArray(0), ByteArray(0) ) ) ntag424DNA.writeNDEF(msg); Log.i("MainActivity", "URI NDEF message written successful ✅") val ndefRead = ntag424DNA.readNDEF() Log.i("MainActivity", "Read URI NDEF message ${CustomModules.getUtility().dumpBytes(ndefRead.toByteArray())}") } private fun changeFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { // 3. Create NTAG 424 DNA file settings for E104 val fileSettings = NTAG424DNAFileSettings( MFPCard.CommunicationMode.Encrypted, // = 0x03 = Full ENC + CMAC (SUN) 0x0E.toByte(), // Read access = key slot 0x00 maybe 0x01 0x0E.toByte(), // Write access = always 0x0E.toByte(), // RW access = always 0x0E.toByte() // Change access = always ) Log.i("MainActivity", "Prepare for saving changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("NFC", "🔐 File settings updated $fileNumber") } private fun changeSDMFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { val fileSettings = ntag424DNA.getFileSettings(fileNumber); fileSettings.isSDMEnabled = true; fileSettings.isUIDMirroringEnabled = true; fileSettings.piccDataOffset = intTo2ByteArray(51) fileSettings.sdmMacOffset = intTo2ByteArray(51) fileSettings.sdmMacInputOffset = intTo2ByteArray(51) fileSettings.sdmReadCounterOffset = intTo2ByteArray(51) fileSettings.uidOffset = intTo2ByteArray(51) fileSettings.sdmAccessRights = byteArrayOf(0x00, 0x00) Log.i("MainActivity", "Prepare for saving SDM changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("NFC", "🔐 File settings updated: SUN CMAC enabled on $fileNumber") } private fun intTo2ByteArray(value: Int): ByteArray { return byteArrayOf( ((value shr 😎 and 0xFF).toByte(), (value and 0xFF).toByte() ) } オフセット番号が URL 内のポジショニングと一致しないことはわかっていますが、何を変更してもこのエラーが発生します。何らかの理由で、この方法ではこれらの設定を保存できないようです。 ntag424DNA.changeFileSettings(fileNumber, fileSettings) これはエラーメッセージです com.nxp.nfclib.exceptions.UsageException: Invalid Parameters! {Invalid Value for PICC Offset} コード・サンプル Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? この問題はオフセット値が間違っているために発生しました。ntag は 21 のデフォルト インデックスを予約しているようです。今、ファクトリー128 AESキーを変更しようとしていますが、changekey()関数は機能しませんでした。 @ukcas Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? ちょっと、そこ、 このThreadに従って JSON データを設定していますが、うまくいきません。ハードウェアを扱うのは初めてなので、非常に困難になっています。私は、NXP Android ライブラリと、ここからのサンプル Android アプリケーションを使用しています: https://www.nxp.com/design/design-center/software/rfid-developer-resources/taplinx-software-development-kit-sdk:TAPLINX 以下はSample_Application_Android/src/main/java/com/nxp/sampletaplinx/WriteActivity.java内のコードです。 public static byte[] intTo2ByteArray(int value) { return new byte[] { (byte) (value & 0xFF), // LSB (byte) ((value >> 8) & 0xFF), // middle byte (byte) ((value >> 16) & 0xFF) // MSB }; } private void tag424DNACardLogic(INTAG424DNA ntag424DNA) { byte[] KEY_AES128_DEFAULT = new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, }; byte[] NTAG424DNA_APP_NAME = {(byte) 0xD2, (byte) 0x76, 0x00, 0x00, (byte) 0x85, 0x01, 0x01}; byte[] data ={ 0x73, 0x75, 0x73, 0x68, 0x69, 0x6C }; mStringBuilder.append("\n\n"); int timeOut = 2000; try { ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME); KeyData aesKeyData = new KeyData(); Key keyDefault = new SecretKeySpec(KEY_AES128_DEFAULT, "AES"); aesKeyData.setKey(keyDefault); ntag424DNA.authenticateEV2First(0, aesKeyData, null); mStringBuilder.append(getString(R.string.Authentication_status_true)); mStringBuilder.append("\n\n"); ntag424DNA.setPICCConfiguration(true); String jsonTemplate = "{\"uuid\":\"00000000000000\",\"counter\":\"000000\",\"cmac\":\"0000000000000000\",\"domain1\":" + 1 + ",\"domain2\":" + 1 + "}"; byte[] jsonBytes = jsonTemplate.getBytes("UTF-8"); NTAG424DNAFileSettings fs = new NTAG424DNAFileSettings( CommunicationMode.Plain, // or MAC/ENC depending on your security (byte) 0x0E, // Read access: Key 0 (byte) 0x0E, // Write access: Key 0 (byte) 0x0E, // Read/Write: Key 0 (byte) 0x00 // Change access: Free ); byte[] type = "U".getBytes("US-ASCII"); fs.setSDMEnabled(true); fs.setUIDMirroringEnabled(true); fs.setSDMReadCounterEnabled(true); byte[] bytes = new byte[] { (byte)0xE0, (byte)0x00, (byte)0x00 }; fs.setSdmAccessRights(bytes); byte[] uuidOffset = intTo2ByteArray(8); fs.setUidOffset(uuidOffset); byte[] readCounterOffset = intTo2ByteArray(35); fs.setSdmReadCounterOffset(readCounterOffset); byte[] macOffset = intTo2ByteArray(51); fs.setSdmMacInputOffset(uuidOffset); fs.setSdmMacOffset(macOffset); ntag424DNA.changeFileSettings(FILE_NUMBER, fs); // Create NDEF record NdefRecordWrapper record = new NdefRecordWrapper( NdefRecordWrapper.TNF_WELL_KNOWN, type, new byte[0], // empty ID jsonBytes // payload (your JSON) ); // Wrap record into NDEF message NdefMessageWrapper msg = new NdefMessageWrapper(record); ntag424DNA.writeNDEF(msg); NxpLogUtils.save(); } catch (Exception e) { writeFailedMessage(); mStringBuilder.append(e.getMessage()); Log.i("MainActivity", "URI NDEF message written successful $msg " + e.getMessage() ); showMessage(mStringBuilder.toString(), PRINT); NxpLogUtils.save(); } } 誰かがこれを手伝ってCANととても助かります Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 助けてくれてありがとう!私のオフセットの値が間違っているというのはその通りです。変更した内容はこれで、設定を保存CANようになりました。 override fun onNewIntent(intent: Intent) { Log.i("NFC", "Intent action: ${intent.action}") super.onNewIntent(intent) Log.i("MainActivity", "NFC tag discovered") val cardType = libInstance.getCardType(intent) Log.i("MainActivity", "Detected card type: $cardType") if (cardType == CardType.NTAG424DNA) { val ntag424DNA: INTAG424DNA = DESFireFactory.getInstance().getNTAG424DNA(libInstance.customModules) val reader: IReader = ntag424DNA.reader try { if (!reader.isConnected) { reader.connect() } ntag424DNA.isoSelectApplicationByDFName(NTAG424DNA_APP_NAME) Log.i("NFC", "ISO selected app by DF Name ✅") authenticateTag(0x00, ntag424DNA, KEY_AES128_DEFAULT) creatingNDEFmessage(ntag424DNA) authenticateTag(0x00, ntag424DNA, KEY_AES128_DEFAULT) changeFileSettings(ntag424DNA, 0x02) if (reader.isConnected) { reader.close() } } catch (e: Exception) { Log.e("MainActivity", e.localizedMessage ?: "No Error Message"); e.printStackTrace() } } } private fun changeFileSettings(ntag424DNA: INTAG424DNA, fileNumber: Int) { // 3. Create NTAG 424 DNA file settings for E104 val fileSettings = NTAG424DNAFileSettings( MFPCard.CommunicationMode.Plain, // = 0x03 = Full ENC + CMAC (SUN) 0x0E.toByte(), // Read access = key slot 0x00 maybe 0x01 0x0E.toByte(), // Write access = always 0x0E.toByte(), // RW access = always 0x00.toByte() // Change access = always ) fileSettings.isSDMEnabled = true fileSettings.isUIDMirroringEnabled = true fileSettings.isSDMReadCounterEnabled = true fileSettings.sdmAccessRights = byteArrayOf(0xfe.toByte(), 0xe1.toByte()) fileSettings.uidOffset = byteArrayOf(0x1A, 0x00, 0x00) fileSettings.sdmReadCounterOffset = byteArrayOf(0x2d, 0x00, 0x00) fileSettings.sdmMacOffset = byteArrayOf(0x39, 0x00, 0x00) fileSettings.sdmMacInputOffset = byteArrayOf(0x39, 0x00, 0x00) Log.i("MainActivity", "Prepare for saving changes in file $fileNumber") ntag424DNA.changeFileSettings(fileNumber, fileSettings) Log.i("MainActivity", "🔐 File settings updated $fileNumber") } private fun creatingNDEFmessage(ntag424DNA: INTAG424DNA) { // 1. Creating URI NDEF message val payload = byteArrayOf(0x04) + "noexample.xxxx?uid=00000000000000&ctr=000000&cmac=0000000000000000".toByteArray() val msg = NdefMessageWrapper( NdefRecordWrapper( NdefRecordWrapper.TNF_WELL_KNOWN, "U".toByteArray(StandardCharsets.US_ASCII), ByteArray(0), payload ) ) ntag424DNA.writeNDEF(msg); Log.i("MainActivity", "URI NDEF message written successful ✅") val ndefRead = ntag424DNA.readNDEF() Log.i("MainActivity", "Read URI NDEF message ${CustomModules.getUtility().dumpBytes(ndefRead.toByteArray())}") } Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? 親愛なるロッキー2様 jimmyvhan が参照しているドキュメントとデータシートを確認してください。 オフセットが重複していますが、これはデータシートでは許可されていません。 ご希望のURLを検討中です。NFCCounter のスペースが 3 バイトと少なすぎます。SO、以下の設定は修正された URL に適しています。 https://domain.com?uid=04BB38D2AA1191&ctr=000001&cmac=3ab665b76b795cb9bf76a17956cc9fb3&rand=422def08-8a1c-49c9-9138-434cde858faa SDM 構成にはこれらのパラメータを使用する必要があります。CMAC 計算のための入力データも決定します。この例では、UIDOffset を出発点として使用しました。 fileSettings.sdmMacOffset = intTo2ByteArray(53) fileSettings.sdmMacInputOffset = intTo2ByteArray(22) fileSettings.sdmReadCounterOffset = intTo2ByteArray(41) fileSettings.uidOffset = intTo2ByteArray(22) よろしくお願いします、 TapLinxチーム Re: How can i enable CMAC, UID, COUNTER and RAND in NTAG424 DNA? この文書はあなたにとって役に立つかもしれません。 NTAG 424 DNAとNTAG 424 DNA TagTamperの機能とヒント
查看全文
Secondary boot for XIP-Flash Hi, I would like to enable the Secondary boot functionality of iMXRT1010EVK, after writes '1' to the PERSIST_SECONDARY_BOOT bit of SRC_GPR10 register then make a reset,  it seems not working.. I supposed that the secondary boot image is not placed at the right place as I placed it at the default redundant boot image address 0x60040000, I have no idea if it can work as I also saw a setting of XSPI_FLASH_SEC_IMG_OF FSET that needs to be filled. My question is where I should place the secondary boot image? and are there any register I should set to indicate BootROM to jump? What are necessary steps I should do to boot from Secondary Boot Image? i.MXRT 101x Re: Secondary boot for XIP-Flash Hi, Then it makes sense to make corrections to the documentation to reduce the pain for subsequent engineers:) RT1010 Processor Reference Manual, Rev. 0, 09/2019 (the last avaible for now): - Chapter 9.6.4 Redundant boot image support - Chapter 9.10.2 Enter Bootloader API, Boot image selection field. - Chapter 21.8.14 SRC General Purpose Register 10, PERSIST_SECONDARY_BOOT and PERSIST_REDUNDANT_BOOT fields. Re: Secondary boot for XIP-Flash Hi Calvin Lin, Thanks for your reply. I've confirmed that the Flash Remapping Setting feature is only supported by the RT106x, in another word, the RT1010 doesn't support the feature that jumps to the second image. I've also attached an application note which illustrates the Flash Remapping Setting feature. Have a great day. TIC   ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you!   - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. ------------------------------------------------------------------------------- Re: Secondary boot for XIP-Flash Hi Jeremy, My evaluation kit is iMXRT1010EVK, in my test, I imported two MCUxpresso projects( "iled_blinky" and "hello world") from SDK, then completes the procedures listed below: 1. Compile the "hello world" project first for generating the binary image; 2. Using NXP-MCUBootUtility tool to program the binary image at address 0x60040000; 3. Add codes to "iled_blinky" for writing '1' to the PERSIST_SECONDARY_BOOT bit of SRC_GPR10 register; 4. Download the project "iled_blinky" through MCUxpresso with LPC-Link2; 5. Erasing the XIP-Flash address from 0x60000000 to 0x6003FFFF; 6. Press POR button on EVK board. I supposed that as there is no bootable image on address 0x60000000, so BootROM should redirect boot address to 0x60040000 to run the secondary image, but it didn't. As I couldn't find the way writing XSPI_FLASH_SEC_IMG_OFFSET register, so please explain the procedures what I missed. thank you. Re: Secondary boot for XIP-Flash Hi Calvin Lin, Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you. I'd like to know more information about the phenomenon, so whether you can introduce the process of secondary boot testing you did, and it may help me to figure it out. Looking forward to your reply. Have a great day. TIC   ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you!   - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
查看全文
About rt1052 sdk2.11.0 Example usb_device_msc_disk rt1052 development board connected to an 8G sd card, now there is such a need: sd card front 4G for rt1052 normal read and write, the back of the 4G want to virtualize into a USB flash drive through the usb for computer use. The operation is as follows. 1. sd card fatfs has been correctly partitioned as follows: 2, run usb_device_msc_disk example, the results of the normal recognition of the two partitions; 3, but I only want to be recognized by the PC sd card first partition, so try to modify, as follows The result is that only the first partition is recognized, and it works fine, but I'm not sure if this is the right way to change it, please ask the NXP technician to help me, thank you very much! 回复: 关于rt1052 sdk2.11.0 例子usb_device_msc_disk and the actual USB flash drive is formatted (the files on it have been erased) 回复: 关于rt1052 sdk2.11.0 例子usb_device_msc_disk Hello, I would like to ask your side through the computer on the USB flash drive format (quick format), can normal formatting success, my side through the pc to format USB flash drive, has been prompted: windows can not complete the formatting. Re: 关于rt1052 sdk2.11.0 例子usb_device_msc_disk Hi @944706426. Should work, only tell the OP half the space. Regards. Jing
查看全文
k32l2b31 writing to LPUART1->STAT |= (1<<25) cause semihost_hardfault i want to activate LIN Break detection on k32l2b31  bit LKDE must be set in status register i try LPUART1->STAT |= (1<<25) but it appear "semihost_hardfault" on debug who knows why ? best regards Re: k32l2b31 writing to LPUART1->STAT |= (1<<25) cause semihost_hardfault The "semihost_hardfault" when activating LIN break detection on the K32L2B31 most certainly suggests a problem that extends beyond simply setting the 'LKDE' bit. Possible causes include faulty LPUART clock configuration, accessing the peripheral before proper activation, memory access violations caused by an invalid base address, wrongly configured LIN break interrupts without a handler, or problems with the debugger/semihosting configuration. Before enabling LIN break detection, debug the initialization code, validate the base address, step through code with a debugger, check interrupts, simplify your code, and reference the datasheet to guarantee proper peripheral configuration. pa turnpike ez pass login Re: k32l2b31 writing to LPUART1->STAT |= (1<<25) cause semihost_hardfault The "semihost_hardfault" when enabling LIN break detection on the K32L2B31 likely indicates a problem beyond just setting the `LKDE` bit. Potential causes include incorrect LPUART clock configuration, accessing the peripheral before proper initialization, memory access violations due to a wrong base address, improperly configured LIN break interrupts without a handler, or issues with the debugger/semihosting setup. Debug by reviewing initialization code, verifying the base address, stepping through code with a debugger, checking interrupts, simplifying your code, and consulting the datasheet to ensure correct peripheral setup before enabling LIN break detection.
查看全文
Ilitek ILI9881C MIPI LCD Panel issue on i.MX93 I am working with a carrier board based on the iMX93, which is connected to a DSI panel. I'm trying to use the ilitek ili9881c driver with specific configurations to get the panel to display correctly, but I have been unsuccessful so far. I do some displays with Weston and modetest. In 2 cas, The panel displays something initially, but then the screen becomes blurry and eventually becomes completely unreadable. Could you please assist me in making it work with the information follow : Panel DSI (https://midasdisplays.com/shop/tft/mdt0500b2ihc-mipi/) with documentation (https://midasdisplays.com/wp-content/uploads/2023/08/MDT0500B2IHC-MIPI.pdf) Driver panel-ilitek-ili9881c for ili9881C IC on linux-imx 6.1.36. Configuration : There are no information about timming configuration on datasheet of Panel then i use the configuration from driver "bananapi,lhr050h41" of  "ilitek ili9881c"; Display timings : static const struct drm_display_mode lhr050h41_default_mode = { .clock = 62000, .hdisplay = 720, .hsync_start = 720 + 10, .hsync_end = 720 + 10 + 20, .htotal = 720 + 10 + 20 + 30, .vdisplay = 1280, .vsync_start = 1280 + 10, .vsync_end = 1280 + 10 + 10, .vtotal = 1280 + 10 + 10 + 20, .width_mm = 62, .height_mm = 110, };   Devicetree : &lcdif { status = "okay"; assigned-clock-rates = <310000000>, <62000000>, <400000000>, <133333333>; // assigned-clock-rates = <372000000>, <62000000>, <400000000>, <133333333>; // assigned-clock-rates = <248000000>, <62000000>, <400000000>, <133333333>; }; &dsi { status = "okay"; #address-cells = <1>; #size-cells = <0>; panel@0 { compatible = "bananapi,lhr050h41", "ilitek,ili9881c"; reg = <0>; power-supply = <&reg_vdd_3v3>; reset-gpios = <&ioexpander_1 1 GPIO_ACTIVE_LOW>; backlight = <&disp_backlight>; width-mm = <62>; height-mm = <110>; port { panel_to_dsi: endpoint { remote-endpoint = <&dsi_to_panel>; }; }; }; ports { port@1 { reg = <1>; dsi_to_panel: endpoint { remote-endpoint = <&panel_to_dsi>; }; }; }; }; &epxp { status = "okay"; }; &dphy { status = "okay"; }; Clock configuration : /* * Fvco = (Fref / rdiv) * (MFI + MFN / MFD) * Fout = Fvco / odiv * The (Fref / rdiv) should be in range 20MHz to 40MHz * The Fvco should be in range 2.5Ghz to 5Ghz */ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = { PLL_FRACN_GP(1700000000U, 141, 0, 0, 1, 2), PLL_FRACN_GP(1400000000U, 175, 0, 0, 1, 3), PLL_FRACN_GP(1039500000U, 173, 25, 100, 1, 4), PLL_FRACN_GP(900000000U, 150, 0, 0, 1, 4), PLL_FRACN_GP(800000000U, 200, 0, 0, 1, 6), PLL_FRACN_GP(650000000U, 162, 50, 100, 0, 6), PLL_FRACN_GP(594000000U, 198, 0, 1, 0, 8), PLL_FRACN_GP(560000000U, 140, 0, 1, 0, 6), PLL_FRACN_GP(520800000U, 217, 0, 1, 1, 10), PLL_FRACN_GP(504000000U, 42, 0, 1, 1, 2), PLL_FRACN_GP(498000000U, 166, 0, 1, 0, 8), PLL_FRACN_GP(484000000U, 121, 0, 1, 0, 6), PLL_FRACN_GP(445333333U, 167, 0, 1, 0, 9), PLL_FRACN_GP(400000000U, 200, 0, 1, 0, 12), PLL_FRACN_GP(393216000U, 163, 84, 100, 0, 10), PLL_FRACN_GP(300000000U, 150, 0, 1, 0, 12), /* ILI9881C Panel */ PLL_FRACN_GP(372000000U, 186, 0, 1, 0, 12), PLL_FRACN_GP(310000000U, 155, 0, 1, 0, 12), PLL_FRACN_GP(248000000U, 124, 0, 1, 0, 12) }; From documentation of imx93: Clocks : tested with 3 clocks x4, x5, x6 cat /sys/kernel/debug/clk/clk_summary Weston :  mopdetest : sudo modetest -M imx-drm -D 0 -a -s 35@33:720x1280 -P 31@33:720x1280 Is my configuration wrong ? #i.MX93 #DSI #ILI9881C Re: Ilitek ILI9881C MIPI LCD Panel issue on i.MX93 can you please share your DTS file  Re: Ilitek ILI9881C MIPI LCD Panel issue on i.MX93 Hello, Please do accept my apologize for the delayed response, the logs provided show no issues, it just shows that the driver is running, from the same logs I see that the driver triggers a sleep thats the only "strange" thing I could see, I could suggest a couple of things to try out if you are willing to try. 1.- Please double check the voltage level of the display that it is correct and working as expected when the failure is seen, specifically the PWM. 2.- Please double check with the display vendor wheter the driver is working as spected, as this driver is not provided by us. Best regards/Saludos, Aldo. Re: Ilitek ILI9881C MIPI LCD Panel issue on i.MX93 Hello Aldo. Thank you for your response. I tested with different clocks, but the issue remains the same: the panel initially displays something, but then the screen becomes blurry and eventually becomes completely unreadable. Strange message in logs: I analyzed the dmesg logs and found an issue with dw-mipi-dsi-imx (see the dmesg log). The fset command doesn't provide the timing information (see the fset command output). New questions : Question 1: How can I resolve this issue? Question 2: Based on the log information below, is there any other issue? 1. Configuration I contacted the panel provider and obtained more information about the timing configuration : Here is my new configuration : linux-imx/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c for 720x1280x60 Hz static const struct drm_display_mode lhr050h41_default_mode = { .clock = 66340, .hdisplay = 720, .hsync_start = 720 + 4, // HACT + HSA .hsync_end = 720 + 4 + 60, // HACT + HSA + HBP .htotal = 720 + 4 + 60 + 60, // HACT + HSA + HBP + HFP .vdisplay = 1280, .vsync_start = 1280 + 4, // VACT + VSA .vsync_end = 1280 + 4 + 16, // VACT + VSA + VBP .vtotal = 1280 + 4 + 16 + 10, // VACT + VSA + VBP + VFP .width_mm = 62, .height_mm = 110, }; Devicetree : &lcdif { status = "okay"; assigned-clock-rates = <331700000>, <66340000>, <400000000>, <133333333>; // assigned-clock-rates = <256360000>, <66340000>, <400000000>, <133333333>; }; &dsi { status = "okay"; #address-cells = <1>; #size-cells = <0>; panel@0 { compatible = "bananapi,lhr050h41", "ilitek,ili9881c"; reg = <0>; power-supply = <&reg_vdd_3v3>; reset-gpios = <&ioexpander_1 1 GPIO_ACTIVE_LOW>; backlight = <&disp_backlight>; width-mm = <62>; height-mm = <110>; port { panel_to_dsi: endpoint { remote-endpoint = <&dsi_to_panel>; }; }; }; ports { port@1 { reg = <1>; dsi_to_panel: endpoint { remote-endpoint = <&panel_to_dsi>; }; }; }; }; &epxp { status = "okay"; }; &dphy { status = "okay"; }; linux-imx/drivers/clk/imx/clk-fracn-gppll.c /* * Fvco = (Fref / rdiv) * (MFI + MFN / MFD) * Fout = Fvco / odiv * The (Fref / rdiv) should be in range 20MHz to 40MHz * The Fvco should be in range 2.5Ghz to 5Ghz */ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = { PLL_FRACN_GP(1700000000U, 141, 0, 0, 1, 2), PLL_FRACN_GP(1400000000U, 175, 0, 0, 1, 3), PLL_FRACN_GP(1039500000U, 173, 25, 100, 1, 4), PLL_FRACN_GP(900000000U, 150, 0, 0, 1, 4), PLL_FRACN_GP(800000000U, 200, 0, 0, 1, 6), PLL_FRACN_GP(650000000U, 162, 50, 100, 0, 6), PLL_FRACN_GP(594000000U, 198, 0, 1, 0, 8), PLL_FRACN_GP(560000000U, 140, 0, 1, 0, 6), PLL_FRACN_GP(520800000U, 217, 0, 1, 1, 10), PLL_FRACN_GP(504000000U, 42, 0, 1, 1, 2), PLL_FRACN_GP(498000000U, 166, 0, 1, 0, 8), PLL_FRACN_GP(484000000U, 121, 0, 1, 0, 6), PLL_FRACN_GP(445333333U, 167, 0, 1, 0, 9), PLL_FRACN_GP(400000000U, 200, 0, 1, 0, 12), PLL_FRACN_GP(393216000U, 163, 84, 100, 0, 10), PLL_FRACN_GP(300000000U, 150, 0, 1, 0, 12), PLL_FRACN_GP(331700000U, 165, 17, 20, 1, 12), // _rate, _mfi, _mfn, _mfd, _rdiv, _odiv PLL_FRACN_GP(256360000U, 128, 9, 50, 1, 12) }; Clock summery from commande: cat /sys/kernel/debug/clk/clk_summary 2. Log a. DMESG  I added some printk in PANEL driver code to check its flow (Log begin with PANEL:) ... [ 1.613373] pwm-backlight pwm-backlight: GPIO lookup for consumer enable [ 1.613387] pwm-backlight pwm-backlight: using device tree for GPIO lookup [ 1.613396] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/pwm-backlight[0]' [ 1.613407] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/pwm-backlight[0]' [ 1.613417] pwm-backlight pwm-backlight: using lookup tables for GPIO lookup [ 1.613422] pwm-backlight pwm-backlight: No GPIO consumer enable found [ 1.616645] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops) [ 1.624620] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@4ae10000 to encoder DSI-34: -517 [ 1.634715] dw-mipi-dsi-imx 4ae10000.dsi: [drm:dw_mipi_dsi_imx_bind] *ERROR* failed to attach bridge: -517 [ 1.644614] dw-mipi-dsi-imx 4ae10000.dsi: [drm:dw_mipi_dsi_imx_probe] *ERROR* failed to register component: -517 ... [ 1.805466] pca953x 4-0020: GPIO lookup for consumer reset [ 1.805476] pca953x 4-0020: using device tree for GPIO lookup [ 1.805484] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc@0/bus@42000000/i2c@426b0000/gpio@20[0]' [ 1.805501] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc@0/bus@42000000/i2c@426b0000/gpio@20[0]' [ 1.805515] pca953x 4-0020: using lookup tables for GPIO lookup [ 1.805519] pca953x 4-0020: No GPIO consumer reset found [ 1.805622] pca953x 4-0020: using no AI [ 1.809964] gpiochip_find_base: found new base at 488 [ 1.809995] gpio gpiochip5: Persistence not supported for GPIO 2 [ 1.810280] gpio-490 (reset): hogged as output/high [ 1.815318] gpio gpiochip5: (4-0020): added GPIO chardev (254:5) [ 1.815325] gpio gpiochip5: registered GPIOs 488 to 495 on 4-0020 [ 1.815517] pca953x 4-0021: GPIO lookup for consumer reset [ 1.815522] pca953x 4-0021: using device tree for GPIO lookup [ 1.815530] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc@0/bus@42000000/i2c@426b0000/gpio@21[0]' [ 1.815545] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc@0/bus@42000000/i2c@426b0000/gpio@21[0]' [ 1.815559] pca953x 4-0021: using lookup tables for GPIO lookup [ 1.815563] pca953x 4-0021: No GPIO consumer reset found [ 1.815660] pca953x 4-0021: using no AI [ 1.819619] gpiochip_find_base: found new base at 480 ... [ 1.837049] PANEL: ili9881c_dsi_probe [ 1.837165] ili9881c-dsi 4ae10000.dsi.0: GPIO lookup for consumer reset [ 1.840818] ili9881c-dsi 4ae10000.dsi.0: using device tree for GPIO lookup [ 1.840843] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/soc@0/dsi@4ae10000/panel@0[0]' - status (0) [ 1.841045] PANEL: drm_panel_of_backlight [ 1.841053] PANEL: drm_panel_add [ 1.845060] PANEL: mipi_dsi_attach [ 1.849049] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops) [ 1.860484] imx-drm display-subsystem: bound 4ae10000.dsi (ops dw_mipi_dsi_imx_ops) [ 1.868486] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0 [ 1.876358] PANEL: ili9881c_get_modes [ 1.876360] PANEL: drm_mode_duplicate [ 1.880018] PANEL: drm_mode_set_name [ 1.883671] PANEL: mode->type = 0x48 [ 1.887239] PANEL: drm_mode_set_name [ 1.890801] PANEL: return 1 [ 1.937230] PANEL: ili9881c_prepare [ 1.937238] PANEL: regulator_enable -> Sleep 5ms [ 1.953133] ------------[ cut here ]------------ [ 1.953138] WARNING: CPU: 0 PID: 40 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc [ 1.953158] Modules linked in: [ 1.953165] CPU: 0 PID: 40 Comm: kworker/u4:1 Not tainted 6.1.36+gd997ba75bc0a #1 [ 1.953171] Hardware name: BOSCH MOP ENG i.MX93 Sirius board (DT) [ 1.953175] Workqueue: events_unbound deferred_probe_work_func [ 1.953185] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1.953190] pc : gpiod_set_value+0x5c/0xcc [ 1.953194] lr : ili9881c_prepare+0x74/0x1e8 [ 1.953202] sp : ffff80000a12b340 [ 1.953205] x29: ffff80000a12b340 x28: ffff0000050cc4b0 x27: 0000000000000000 [ 1.953212] x26: ffff800009396ad0 x25: ffff8000097619f0 x24: 0000000000000028 [ 1.953219] x23: 00000000ffff98ff x22: 00000000ffffff81 x21: 0000000000000000 [ 1.953225] x20: 0000000000000001 x19: ffff0000042cc430 x18: fffffffffffebf10 [ 1.953232] x17: 0000000017b99bc0 x16: 00000000000000c7 x15: 0000000000000030 [ 1.953238] x14: 0000000000000152 x13: 0000000000000000 x12: 0000000000000000 [ 1.953244] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff80000a12b240 [ 1.953251] x8 : ffff00002fd94000 x7 : ffff00002fd9ab40 x6 : 0000000008c2a66c [ 1.953257] x5 : 00000000410fd050 x4 : 0000000000000000 x3 : 0000000000000000 [ 1.953263] x2 : 0000000000000000 x1 : ffff000004bdad00 x0 : 0000000000000001 [ 1.953270] Call trace: [ 1.953273] gpiod_set_value+0x5c/0xcc [ 1.953278] ili9881c_prepare+0x74/0x1e8 [ 1.953282] drm_panel_prepare+0x28/0x40 [ 1.953290] panel_bridge_pre_enable+0x14/0x20 [ 1.953296] drm_atomic_bridge_chain_pre_enable+0x94/0xd0 [ 1.953304] drm_atomic_helper_commit_modeset_enables+0x170/0x26c [ 1.953310] lcdifv3_drm_atomic_commit_tail+0x30/0x70 [ 1.953317] commit_tail+0xa4/0x190 [ 1.953321] drm_atomic_helper_commit+0x164/0x180 [ 1.953327] drm_atomic_commit+0xa8/0xe0 [ 1.953332] drm_client_modeset_commit_atomic+0x210/0x270 [ 1.953338] drm_client_modeset_commit_locked+0x5c/0x18c [ 1.953342] drm_client_modeset_commit+0x30/0x60 [ 1.953346] drm_fb_helper_set_par+0xb8/0x110 [ 1.953351] fbcon_init+0x1fc/0x500 [ 1.953356] visual_init+0xb4/0x104 [ 1.953364] do_bind_con_driver.isra.0+0x1b8/0x390 [ 1.953368] do_take_over_console+0x1a4/0x200 [ 1.953372] do_fbcon_takeover+0x6c/0xe4 [ 1.953376] fbcon_fb_registered+0x1e0/0x1ec [ 1.953380] register_framebuffer+0x1ac/0x2f4 [ 1.953386] __drm_fb_helper_initial_config_and_unlock+0x358/0x540 [ 1.953391] drm_fbdev_client_hotplug+0x150/0x210 [ 1.953395] drm_fbdev_generic_setup+0xb4/0x194 [ 1.953399] imx_drm_bind+0x260/0x2e0 [ 1.953406] try_to_bring_up_aggregate_device+0x164/0x1d0 [ 1.953412] __component_add+0xa4/0x170 [ 1.953416] component_add+0x14/0x20 [ 1.953420] dw_mipi_dsi_imx_probe+0x118/0x254 [ 1.953424] platform_probe+0x68/0xc0 [ 1.953429] really_probe+0xbc/0x2dc [ 1.953433] __driver_probe_device+0x78/0x114 [ 1.953437] driver_probe_device+0x3c/0x15c [ 1.953441] __device_attach_driver+0xb8/0x134 [ 1.953445] bus_for_each_drv+0x7c/0xd4 [ 1.953451] __device_attach+0x9c/0x1a0 [ 1.953455] device_initial_probe+0x14/0x20 [ 1.953459] bus_probe_device+0x98/0xa0 [ 1.953463] deferred_probe_work_func+0x80/0xc0 [ 1.953467] process_one_work+0x1d4/0x330 [ 1.953474] worker_thread+0x220/0x430 [ 1.953478] kthread+0x108/0x10c [ 1.953483] ret_from_fork+0x10/0x20 [ 1.953489] ---[ end trace 0000000000000000 ]--- [ 1.953591] PANEL: gpiod_set_value 1 (reset)-> Sleep 20ms [ 1.981153] ------------[ cut here ]------------ [ 1.981156] WARNING: CPU: 0 PID: 40 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc [ 1.981167] Modules linked in: [ 1.981172] CPU: 0 PID: 40 Comm: kworker/u4:1 Tainted: G W 6.1.36+gd997ba75bc0a #1 [ 1.981176] Hardware name: BOSCH MOP ENG i.MX93 Sirius board (DT) [ 1.981179] Workqueue: events_unbound deferred_probe_work_func [ 1.981185] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1.981190] pc : gpiod_set_value+0x5c/0xcc [ 1.981195] lr : ili9881c_prepare+0x94/0x1e8 [ 1.981199] sp : ffff80000a12b340 [ 1.981201] x29: ffff80000a12b340 x28: ffff0000050cc4b0 x27: 0000000000000000 [ 1.981208] x26: ffff800009396ad0 x25: ffff8000097619f0 x24: 0000000000000028 [ 1.981215] x23: 00000000ffff98ff x22: 00000000ffffff81 x21: 0000000000000000 [ 1.981222] x20: 0000000000000000 x19: ffff0000042cc430 x18: fffffffffffecca0 [ 1.981228] x17: 0000000017b99bc0 x16: 00000000000000c7 x15: 0000000000000038 [ 1.981235] x14: 0000000000000022 x13: 0000000000000000 x12: 0000000000000000 [ 1.981241] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff80000a12b240 [ 1.981248] x8 : ffff00002fd94000 x7 : ffff00002fd9ab40 x6 : 00000000ffffffff [ 1.981254] x5 : 00000000410fd050 x4 : 0000000000000000 x3 : 0000000000000000 [ 1.981260] x2 : 0000000000000000 x1 : ffff000004bdad00 x0 : 0000000000000001 [ 1.981266] Call trace: [ 1.981268] gpiod_set_value+0x5c/0xcc [ 1.981273] ili9881c_prepare+0x94/0x1e8 [ 1.981278] drm_panel_prepare+0x28/0x40 [ 1.981284] panel_bridge_pre_enable+0x14/0x20 [ 1.981288] drm_atomic_bridge_chain_pre_enable+0x94/0xd0 [ 1.981295] drm_atomic_helper_commit_modeset_enables+0x170/0x26c [ 1.981301] lcdifv3_drm_atomic_commit_tail+0x30/0x70 [ 1.981306] commit_tail+0xa4/0x190 [ 1.981311] drm_atomic_helper_commit+0x164/0x180 [ 1.981316] drm_atomic_commit+0xa8/0xe0 [ 1.981321] drm_client_modeset_commit_atomic+0x210/0x270 [ 1.981327] drm_client_modeset_commit_locked+0x5c/0x18c [ 1.981331] drm_client_modeset_commit+0x30/0x60 [ 1.981336] drm_fb_helper_set_par+0xb8/0x110 [ 1.981340] fbcon_init+0x1fc/0x500 [ 1.981345] visual_init+0xb4/0x104 [ 1.981351] do_bind_con_driver.isra.0+0x1b8/0x390 [ 1.981355] do_take_over_console+0x1a4/0x200 [ 1.981359] do_fbcon_takeover+0x6c/0xe4 [ 1.981364] fbcon_fb_registered+0x1e0/0x1ec [ 1.981368] register_framebuffer+0x1ac/0x2f4 [ 1.981374] __drm_fb_helper_initial_config_and_unlock+0x358/0x540 [ 1.981379] drm_fbdev_client_hotplug+0x150/0x210 [ 1.981383] drm_fbdev_generic_setup+0xb4/0x194 [ 1.981388] imx_drm_bind+0x260/0x2e0 [ 1.981393] try_to_bring_up_aggregate_device+0x164/0x1d0 [ 1.981397] __component_add+0xa4/0x170 [ 1.981402] component_add+0x14/0x20 [ 1.981406] dw_mipi_dsi_imx_probe+0x118/0x254 [ 1.981409] platform_probe+0x68/0xc0 [ 1.981414] really_probe+0xbc/0x2dc [ 1.981418] __driver_probe_device+0x78/0x114 [ 1.981422] driver_probe_device+0x3c/0x15c [ 1.981426] __device_attach_driver+0xb8/0x134 [ 1.981430] bus_for_each_drv+0x7c/0xd4 [ 1.981436] __device_attach+0x9c/0x1a0 [ 1.981439] device_initial_probe+0x14/0x20 [ 1.981443] bus_probe_device+0x98/0xa0 [ 1.981447] deferred_probe_work_func+0x80/0xc0 [ 1.981451] process_one_work+0x1d4/0x330 [ 1.981456] worker_thread+0x220/0x430 [ 1.981461] kthread+0x108/0x10c [ 1.981464] ret_from_fork+0x10/0x20 [ 1.981470] ---[ end trace 0000000000000000 ]--- [ 1.981560] PANEL: gpiod_set_value 0 (reset)-> Sleep 20ms [ 2.193755] PANEL: ili9881c_switch_page [ 2.194765] PANEL: mipi_dsi_dcs_set_tear_on [ 2.195774] PANEL: mipi_dsi_dcs_exit_sleep_mode [ 2.196783] PANEL: ili9881c_prepare -> OK [ 2.196789] PANEL: ili9881c_enable + sleep 120ms [ 2.401176] PANEL: mipi_dsi_dcs_set_display_on [ 2.402191] PANEL: ili9881c_enable -> OK [ 2.452996] Console: switching to colour frame buffer device 90x80 ... [ 3.458019] mmc1: SDHCI controller on 42860000.mmc [42860000.mmc] using ADMA [ 3.490601] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none. [ 3.499240] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 3.505721] devtmpfs: mounted [ 3.512373] Freeing unused kernel memory: 3200K [ 3.517072] Run /sbin/init as init process [ 3.521270] with arguments: [ 3.521272] /sbin/init [ 3.521275] with environment: [ 3.521277] HOME=/ [ 3.521279] TERM=linux [ 3.521281] dtb-module=sirius-imx93.dtb [ 3.642688] systemd[1]: systemd 253.1^ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -TPM2 -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid) [ 3.674584] systemd[1]: Detected architecture arm64. ... b. WESTON weston ini :  cat /etc/xdg/weston/weston.ini [core] use-g2d=true repaint-window=16 #gbm-format=argb8888 idle-time=0 xwayland=true #enable-overlay-view=1 [shell] [libinput] touchscreen_calibrator=true [output] name=DSI-1 mode=720x1280@60 [screen-share] command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize Weston log Date: 2024-11-21 CET [11:38:49.372] weston 11.0.2 https://wayland.freedesktop.org Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/ Build: 10.0.0-661-ga3c5e63a+ [11:38:49.373] Command line: /usr/bin/weston --log=/run/user/0/weston.log --modules=systemd-notify.so [11:38:49.373] OS: Linux, 6.1.36+gd997ba75bc0a, #1 SMP PREEMPT Sun Nov 3 01:09:31 UTC 2024, aarch64 [11:38:49.373] Flight recorder: enabled [11:38:49.374] Using config file '/etc/xdg/weston/weston.ini' [11:38:49.375] Output repaint window is 16 ms maximum. [11:38:49.377] Loading module '/usr/lib/libweston-11/drm-backend.so' [11:38:49.383] initializing drm backend [11:38:49.383] Trying logind launcher... [11:38:49.397] logind: session control granted [11:38:49.405] using /dev/dri/card0 [11:38:49.405] DRM: supports atomic modesetting [11:38:49.405] DRM: does not support GBM modifiers [11:38:49.405] DRM: supports picture aspect ratio [11:38:49.406] Loading module '/usr/lib/libweston-11/g2d-renderer.so' [11:38:49.476] failed to query DRM device from EGL [11:38:49.500] event1 - gpio-keys: is tagged by udev as: Keyboard [11:38:49.500] event1 - gpio-keys: device is a keyboard [11:38:49.508] event2 - Goodix Capacitive TouchScreen: is tagged by udev as: Keyboard Touchscreen [11:38:49.509] event2 - Goodix Capacitive TouchScreen: device is a keyboard [11:38:49.509] event2 - Goodix Capacitive TouchScreen: device is a touch device [11:38:49.517] event0 - 44440000.bbnsm:pwrkey: is tagged by udev as: Keyboard [11:38:49.518] event0 - 44440000.bbnsm:pwrkey: device is a keyboard [11:38:49.552] libinput: configuring device "gpio-keys". [11:38:49.552] Touchscreen - Goodix Capacitive TouchScreen - /sys/devices/platform/soc@0/44000000.bus/44350000.i2c/i2c-1/1-005d/input/input2/event2 [11:38:49.552] libinput: configuring device "Goodix Capacitive TouchScreen". [11:38:49.552] input device event2 has no enabled output associated (none named), skipping calibration for now. [11:38:49.552] libinput: configuring device "44440000.bbnsm:pwrkey". [11:38:49.571] DRM: head 'DSI-1' updated, connector 35 is connected, EDID make 'unknown', model 'unknown', serial 'unknown' Supported EOTF modes: SDR [11:38:49.571] DRM: head 'DSI-1' found, connector 35 is connected, EDID make 'unknown', model 'unknown', serial 'unknown' Supported EOTF modes: SDR [11:38:49.571] Registered plugin API 'weston_drm_output_api_v1' of size 32 [11:38:49.571] Color manager: no-op [11:38:49.572] Loading module '/usr/lib/libgbm.so' [11:38:49.572] Failed to load module: /usr/lib/libgbm.so: cannot open shared object file: No such file or directory [11:38:49.572] Output 'DSI-1' attempts EOTF mode: SDR [11:38:49.572] Output 'DSI-1' using color profile: built-in default sRGB SDR profile [11:38:49.577] Initialized backlight for head 'DSI-1', device /sys/class/backlight/pwm-backlight [11:38:49.577] Output DSI-1 (crtc 33) video modes: [email protected], preferred, current, 62.0 MHz [11:38:49.577] associating input device event1 with output DSI-1 (none by udev) [11:38:49.577] associating input device event2 with output DSI-1 (none by udev) [11:38:49.578] associating input device event0 with output DSI-1 (none by udev) [11:38:49.578] Output 'DSI-1' enabled with head(s) DSI-1 [11:38:49.578] Compositor capabilities: arbitrary surface rotation: yes screen capture uses y-flip: yes cursor planes: yes arbitrary resolutions: no view mask clipping: yes explicit sync: yes color operations: no presentation clock: CLOCK_MONOTONIC, id 1 presentation clock resolution: 0.000000001 s [11:38:49.579] Loading module '/usr/lib/weston/desktop-shell.so' [11:38:49.581] Loading module '/usr/lib/libweston-11/xwayland.so' [11:38:49.648] Registered plugin API 'weston_xwayland_v1' of size 32 [11:38:49.648] Registered plugin API 'weston_xwayland_surface_v1' of size 16 [11:38:49.648] xserver listening on display :0 [11:38:49.649] Loading module '/usr/lib/weston/systemd-notify.so' [11:38:49.650] info: add 1 socket(s) provided by systemd [11:38:49.650] launching '/usr/libexec/weston-keyboard' [11:38:49.658] launching '/usr/libexec/weston-desktop-shell' c. Modetest fbset   Modetest Encoders: id crtc type possible crtcs possible clones 34 33 DSI 0x00000001 0x00000001 Connectors: id encoder status name size (mm) modes encoders 35 34 connected DSI-1 62x110 1 34 modes: index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot #0 720x1280 60.22 720 730 750 780 1280 1290 1300 1320 62000 flags: ; type: preferred, driver props: 1 EDID: flags: immutable blob blobs: value: 2 DPMS: flags: enum enums: On=0 Standby=1 Suspend=2 Off=3 value: 0 5 link-status: flags: enum enums: Good=0 Bad=1 value: 0 6 non-desktop: flags: immutable range values: 0 1 value: 0 4 TILE: flags: immutable blob blobs: value: CRTCs: id fb pos size 33 36 (0,0) (720x1280) #0 720x1280 60.22 720 730 750 780 1280 1290 1300 1320 62000 flags: ; type: preferred, driver props: 24 VRR_ENABLED: flags: range values: 0 1 value: 0 Planes: id crtc fb CRTC x,y x,y gamma size possible crtcs 31 33 36 0,0 0,0 0 0x00000001 formats: XR24 AR24 RG16 XB24 AB24 AR15 XR15 props: 8 type: flags: immutable enum enums: Overlay=0 Primary=1 Cursor=2 value: 1 32 zpos: flags: immutable range values: 0 0 value: 0 Frame buffers: id size pitch modetest -M imx-drm -D 0 -a -s 35@33:720x1280 -P 31@33:720x1280 setting mode 720x1280-60.22Hz on connectors 35, crtc 33 failed to set gamma: Function not implemented testing 720x1280@XR24 on plane 31, crtc 33 ##################################################################################### STOP MODETEST ##################################################################################### [ 190.526189] PANEL: return 1 [ 358.517178] PANEL: ili9881c_disable [ 358.521022] ------------[ cut here ]------------ [ 358.529113] WARNING: CPU: 0 PID: 371 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc [ 358.537631] Modules linked in: crct10dif_ce polyval_ce polyval_generic layerscape_edac_mod at24 btnxpuart fuse [last unloaded: goodix_ts] [ 358.549975] CPU: 0 PID: 371 Comm: modetest Tainted: G W 6.1.36+gd997ba75bc0a #1 [ 358.558656] Hardware name: BOSCH MOP ENG i.MX93 Sirius board (DT) [ 358.564732] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 358.571682] pc : gpiod_set_value+0x5c/0xcc [ 358.575764] lr : ili9881c_unprepare+0x30/0x50 [ 358.580115] sp : ffff80000b14b930 [ 358.583417] x29: ffff80000b14b930 x28: ffff800009396ad0 x27: ffff0000042cc888 [ 358.590541] x26: ffff0000042cca80 x25: ffff000008262a00 x24: ffff800009761948 [ 358.597665] x23: 0000000000000038 x22: ffff00000506e800 x21: ffff0000042cc8e0 [ 358.604789] x20: 0000000000000001 x19: ffff0000042cc430 x18: 0000000000000006 [ 358.611913] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80000b14b490 [ 358.619037] x14: 000000000000032c x13: 000000000000032c x12: 0000000000000001 [ 358.626161] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff80000b14b6b0 [ 358.633285] x8 : ffff0000082b0ac0 x7 : ffff000005193200 x6 : 0000000000000001 [ 358.640409] x5 : 0000000000000000 x4 : ffff0000082b0000 x3 : ffff800009cd1b18 [ 358.647533] x2 : 0000000000000000 x1 : ffff000004bdad00 x0 : 0000000000000001 [ 358.654657] Call trace: [ 358.657093] gpiod_set_value+0x5c/0xcc [ 358.660837] ili9881c_unprepare+0x30/0x50 [ 358.664832] drm_panel_unprepare+0x28/0x40 [ 358.668922] panel_bridge_post_disable+0x14/0x20 [ 358.673524] dw_mipi_dsi_bridge_post_atomic_disable+0x38/0xf0 [ 358.679261] drm_atomic_bridge_chain_post_disable+0x54/0xd0 [ 358.684825] disable_outputs+0x11c/0x2d0 [ 358.688734] drm_atomic_helper_commit_modeset_disables+0x1c/0x50 [ 358.694723] lcdifv3_drm_atomic_commit_tail+0x24/0x70 [ 358.699758] commit_tail+0xa4/0x190 [ 358.703234] drm_atomic_helper_commit+0x164/0x180 [ 358.707922] drm_atomic_commit+0xa8/0xe0 [ 358.711831] drm_mode_atomic_ioctl+0x8d8/0xb50 [ 358.716259] drm_ioctl_kernel+0xc8/0x174 [ 358.720177] drm_ioctl+0x20c/0x420 [ 358.723565] __arm64_sys_ioctl+0xac/0xf0 [ 358.727483] invoke_syscall+0x48/0x114 [ 358.731227] el0_svc_common.constprop.0+0xcc/0xec [ 358.735916] do_el0_svc+0x2c/0xd0 [ 358.739217] el0_svc+0x2c/0x84 [ 358.742268] el0t_64_sync_handler+0xf4/0x120 [ 358.746523] el0t_64_sync+0x18c/0x190 [ 358.750173] ---[ end trace 0000000000000000 ]--- [ 358.755814] PANEL: ili9881c_unprepare [ 358.755873] VDD_3V3: Underflow of regulator enable count [ 358.764992] ------------[ cut here ]------------ [ 358.769604] WARNING: CPU: 1 PID: 371 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc [ 358.778123] Modules linked in: crct10dif_ce polyval_ce polyval_generic layerscape_edac_mod at24 btnxpuart fuse [last unloaded: goodix_ts] [ 358.790640] CPU: 1 PID: 371 Comm: modetest Tainted: G W 6.1.36+gd997ba75bc0a #1 [ 358.799321] Hardware name: BOSCH MOP ENG i.MX93 Sirius board (DT) [ 358.805398] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 358.812347] pc : gpiod_set_value+0x5c/0xcc [ 358.816429] lr : ili9881c_unprepare+0x30/0x50 [ 358.820780] sp : ffff80000b14b950 [ 358.824082] x29: ffff80000b14b950 x28: ffff800009396ad0 x27: ffff0000042cc888 [ 358.831205] x26: ffff0000042cca80 x25: ffff000008262a00 x24: ffff800009761948 [ 358.838329] x23: 0000000000000038 x22: ffff00000506e800 x21: ffff0000042cc8e0 [ 358.845453] x20: 0000000000000001 x19: ffff0000042cc430 x18: 0000000000000006 [ 358.852577] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80000b14b430 [ 358.859701] x14: 0000000000000272 x13: 0000000000000000 x12: 0000000000000000 [ 358.866825] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff80000b14b6c0 [ 358.873950] x8 : ffff0000082b0ac0 x7 : ffff00002fdaeb40 x6 : 0000000000000000 [ 358.881073] x5 : ffff00002fda7a18 x4 : ffff0000082b0000 x3 : ffff800009cd1b18 [ 358.888197] x2 : 0000000000000000 x1 : ffff000004bdad00 x0 : 0000000000000001 [ 358.895322] Call trace: [ 358.897757] gpiod_set_value+0x5c/0xcc [ 358.901493] ili9881c_unprepare+0x30/0x50 [ 358.905487] drm_panel_unprepare+0x28/0x40 [ 358.909578] panel_bridge_post_disable+0x14/0x20 [ 358.914189] drm_atomic_bridge_chain_post_disable+0x88/0xd0 [ 358.919753] disable_outputs+0x11c/0x2d0 [ 358.923661] drm_atomic_helper_commit_modeset_disables+0x1c/0x50 [ 358.929650] lcdifv3_drm_atomic_commit_tail+0x24/0x70 [ 358.934685] commit_tail+0xa4/0x190 [ 358.938161] drm_atomic_helper_commit+0x164/0x180 [ 358.942849] drm_atomic_commit+0xa8/0xe0 [ 358.946758] drm_mode_atomic_ioctl+0x8d8/0xb50 [ 358.951187] drm_ioctl_kernel+0xc8/0x174 [ 358.955104] drm_ioctl+0x20c/0x420 [ 358.958493] __arm64_sys_ioctl+0xac/0xf0 [ 358.962410] invoke_syscall+0x48/0x114 [ 358.966154] el0_svc_common.constprop.0+0xcc/0xec [ 358.970843] do_el0_svc+0x2c/0xd0 [ 358.974145] el0_svc+0x2c/0x84 [ 358.977196] el0t_64_sync_handler+0xf4/0x120 [ 358.981459] el0t_64_sync+0x18c/0x190 [ 358.985109] ---[ end trace 0000000000000000 ]--- [ 358.989859] PANEL: ili9881c_unprepare [ 359.053293] PANEL: ili9881c_prepare [ 359.056957] PANEL: regulator_enable -> Sleep 5ms [ 359.073199] ------------[ cut here ]------------ [ 359.082420] WARNING: CPU: 1 PID: 371 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc [ 359.090937] Modules linked in: crct10dif_ce polyval_ce polyval_generic layerscape_edac_mod at24 btnxpuart fuse [last unloaded: goodix_ts] [ 359.103273] CPU: 1 PID: 371 Comm: modetest Tainted: G W 6.1.36+gd997ba75bc0a #1 [ 359.111953] Hardware name: BOSCH MOP ENG i.MX93 Sirius board (DT) [ 359.118030] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 359.124979] pc : gpiod_set_value+0x5c/0xcc [ 359.129061] lr : ili9881c_prepare+0x74/0x1e8 [ 359.133325] sp : ffff80000b14b8f0 [ 359.136627] x29: ffff80000b14b8f0 x28: ffff0000050366b0 x27: 0000000000000000 [ 359.143751] x26: ffff800009396ad0 x25: ffff8000097619f0 x24: 0000000000000028 [ 359.150876] x23: 00000000ffff98ff x22: 00000000ffffff81 x21: 0000000000000000 [ 359.157999] x20: 0000000000000001 x19: ffff0000042cc430 x18: 0000000000000000 [ 359.165123] x17: 0000000000000000 x16: 0000000000000008 x15: 0000000000000000 [ 359.172247] x14: 0000000000000074 x13: 0000000000000000 x12: 0000000000000000 [ 359.179371] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff80000b14b7f0 [ 359.186495] x8 : ffff00002fda8000 x7 : ffff000005192a00 x6 : 00000000000003e8 [ 359.193619] x5 : 00000000410fd050 x4 : 0000000000000000 x3 : 0000000000000000 [ 359.200743] x2 : 0000000000000000 x1 : ffff000004bdad00 x0 : 0000000000000001 [ 359.207868] Call trace: [ 359.210304] gpiod_set_value+0x5c/0xcc [ 359.214047] ili9881c_prepare+0x74/0x1e8 [ 359.217955] drm_panel_prepare+0x28/0x40 [ 359.221873] panel_bridge_pre_enable+0x14/0x20 [ 359.226301] drm_atomic_bridge_chain_pre_enable+0x94/0xd0 [ 359.231692] drm_atomic_helper_commit_modeset_enables+0x170/0x26c [ 359.237776] lcdifv3_drm_atomic_commit_tail+0x30/0x70 [ 359.242821] commit_tail+0xa4/0x190 [ 359.246295] drm_atomic_helper_commit+0x164/0x180 [ 359.250984] drm_atomic_commit+0xa8/0xe0 [ 359.254893] drm_client_modeset_commit_atomic+0x210/0x270 [ 359.260284] drm_client_modeset_commit_locked+0x5c/0x18c [ 359.265579] drm_client_modeset_commit+0x30/0x60 [ 359.270181] drm_fbdev_client_restore+0x6c/0xc0 [ 359.274705] drm_client_dev_restore+0x80/0xe0 [ 359.279047] drm_lastclose+0x74/0x8c [ 359.282617] drm_release+0x10c/0x124 [ 359.286179] __fput+0x70/0x250 [ 359.289230] ____fput+0x10/0x20 [ 359.292359] task_work_run+0x80/0xe0 [ 359.295929] do_notify_resume+0x1e0/0x1280 [ 359.300020] el0_svc+0x74/0x84 [ 359.303071] el0t_64_sync_handler+0xf4/0x120 [ 359.307335] el0t_64_sync+0x18c/0x190 [ 359.310984] ---[ end trace 0000000000000000 ]--- [ 359.316570] PANEL: gpiod_set_value 1 (reset)-> Sleep 20ms [ 359.341194] ------------[ cut here ]------------ [ 359.351199] WARNING: CPU: 0 PID: 371 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc [ 359.359717] Modules linked in: crct10dif_ce polyval_ce polyval_generic layerscape_edac_mod at24 btnxpuart fuse [last unloaded: goodix_ts] [ 359.372061] CPU: 0 PID: 371 Comm: modetest Tainted: G W 6.1.36+gd997ba75bc0a #1 [ 359.380741] Hardware name: BOSCH MOP ENG i.MX93 Sirius board (DT) [ 359.386819] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 359.393767] pc : gpiod_set_value+0x5c/0xcc [ 359.397849] lr : ili9881c_prepare+0x94/0x1e8 [ 359.402113] sp : ffff80000b14b8f0 [ 359.405415] x29: ffff80000b14b8f0 x28: ffff0000050366b0 x27: 0000000000000000 [ 359.412539] x26: ffff800009396ad0 x25: ffff8000097619f0 x24: 0000000000000028 [ 359.419663] x23: 00000000ffff98ff x22: 00000000ffffff81 x21: 0000000000000000 [ 359.426787] x20: 0000000000000000 x19: ffff0000042cc430 x18: ffffffffffff7770 [ 359.433912] x17: 0000000000000000 x16: 0000000000000010 x15: 0000000000000038 [ 359.441035] x14: 00000000000003d6 x13: 0000000000000000 x12: 0000000000000000 [ 359.448159] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff80000b14b7f0 [ 359.455283] x8 : ffff00002fd94000 x7 : ffff000005193200 x6 : 0000000208023479 [ 359.462407] x5 : 00000000410fd050 x4 : 0000000000000000 x3 : 0000000000000000 [ 359.469531] x2 : 0000000000000000 x1 : ffff000004bdad00 x0 : 0000000000000001 [ 359.476656] Call trace: [ 359.479092] gpiod_set_value+0x5c/0xcc [ 359.482835] ili9881c_prepare+0x94/0x1e8 [ 359.486744] drm_panel_prepare+0x28/0x40 [ 359.490661] panel_bridge_pre_enable+0x14/0x20 [ 359.495098] drm_atomic_bridge_chain_pre_enable+0x94/0xd0 [ 359.500489] drm_atomic_helper_commit_modeset_enables+0x170/0x26c [ 359.506573] lcdifv3_drm_atomic_commit_tail+0x30/0x70 [ 359.511617] commit_tail+0xa4/0x190 [ 359.515092] drm_atomic_helper_commit+0x164/0x180 [ 359.519781] drm_atomic_commit+0xa8/0xe0 [ 359.523690] drm_client_modeset_commit_atomic+0x210/0x270 [ 359.529072] drm_client_modeset_commit_locked+0x5c/0x18c [ 359.534367] drm_client_modeset_commit+0x30/0x60 [ 359.538969] drm_fbdev_client_restore+0x6c/0xc0 [ 359.543484] drm_client_dev_restore+0x80/0xe0 [ 359.547826] drm_lastclose+0x74/0x8c [ 359.551388] drm_release+0x10c/0x124 [ 359.554950] __fput+0x70/0x250 [ 359.558001] ____fput+0x10/0x20 [ 359.561130] task_work_run+0x80/0xe0 [ 359.564700] do_notify_resume+0x1e0/0x1280 [ 359.568791] el0_svc+0x74/0x84 [ 359.571842] el0t_64_sync_handler+0xf4/0x120 [ 359.576097] el0t_64_sync+0x18c/0x190 [ 359.579747] ---[ end trace 0000000000000000 ]--- Re: Ilitek ILI9881C MIPI LCD Panel issue on i.MX93 Hello, I see that in your test you tried with different clocks, does the issue persist for the different clock values? Also, is there any strange message in logs? Best regards/saludos, Aldo.
查看全文
SWO on S32K344 with S32 Design Studio Hi is there any complete example how to make SWO running using S32 design studio? How to configure pinMUX, clocks, etc? I've tried multiple examples with J-link and PEMicro debuggers, but with no success. I've been using also retarget_itm.c library for ITM configuration (delivered by NXP).  Re: SWO on S32K344 with S32 Design Studio Hi @Julián_AragónM, Has this issue been resolved? I am encountering the same problem, where the MCU enters a hard fault after configuring the TPIU registers, and J-Link is also unable to write data to these registers. Could this be due to some safety protection? Is there any additional configuration I need to perform before writing to these TPIU registers? I would greatly appreciate any help or insights. Re: SWO on S32K344 with S32 Design Studio Hi @jakub-holoubek, I have sent you a private message through the community. Re: SWO on S32K344 with S32 Design Studio Hi @Julián_AragónM, ok thanks. 🙂 I'm aware of that retarget_itm library. However my suspicion is that there is some issue with TPIU related registers. Which are probably accessed by debugger itself: Cortex m7 TPIU registersCortex m7 TPIU registers In case I'm setting them from the code the MCU goes to hard fault. And same happens also in case I connect the debugger (tried J-Link, PEMicro, Lauterbach) and want to enable the SWO through debugger's settings - MCU goes into hard fault.  Re: SWO on S32K344 with S32 Design Studio Hi @jakub-holoubek, I apologize for the late reply. This may be an issue with the implementation of trace and our architecture. There is an internal discussion with the SW team now. I will try to update you if anything else comes up. As of now, you can create a new project in S32DS with prinft ITM, but the retarget_itm library does not work as expected. Best regards, Julián Re: SWO on S32K344 with S32 Design Studio Hi, @Julián_AragónM, yes, I'm using S32K3-T-BOX board. Those TRACE signals are valid for ETM interface. However I need to communicate using ITM through JTAG_TDO pin - so it is routed to JTAG connector. That pin is used for SWO communication in case the SWD protocol is used instead of JTAG - which is my case. Re: SWO on S32K344 with S32 Design Studio Hi @jakub-holoubek, Are you using the S32K344 evaluation board? By default, all TRACE signals are DISABLED. Best regards, Julián Re: SWO on S32K344 with S32 Design Studio Hi @Julián_AragónM, thanks for reply. I've checked that tutorials. One issue I've got is that MCU goes to the hard fault once I want to write/read some TPIU registers. For example this code: *((volatile unsigned *)(ITM_BASE + 0x400F0)) = 0x00000002; /* "Selected PIN Protocol Register": Select which protocol to use for trace output (2: SWO NRZ, 1: SWO Manchester encoding) */ *((volatile unsigned *)(ITM_BASE + 0x40010)) = SWOPrescaler; /* "Async Clock Prescaler Register". Scale the baud rate of the asynchronous output */ Once trying to set one of those registers the MCU goes to hard fault. I've found in reference manual of ARM M7 core, that TPIU is not configured in M7 cores - can you confirm that?  Or is there any other register I have to set before writing into TPIU related registers? Re: SWO on S32K344 with S32 Design Studio Hi @jakub-holoubek, I believe this is a question for SEGGER instead. There is no other example for configuring this with S32DS specifically, but you can use the following posts as guidance:  Tutorial: Using Single Wire Output SWO with ARM Cortex-M and Eclipse | MCU on Eclipse. PEmicro Forums Topic: Problem with ITM-printf in S32DS using Multilink ACP Rev.B Solved: SWV (ITM --> SWO) on S32k324 not working - NXP Community Also, SEGGER has a dedicated page in their knowledge base for their J-Link SWO Viewer: J-Link SWO Viewer - SEGGER Knowledge Base & UM08001 J-Link / J-Trace User Guide - SEGGER Knowledge Base. Best regards, Julián Re: SWO on S32K344 with S32 Design Studio For example in this article: Single Wire Output (SWO) support within S32 Design Studio, enabled by PEmicro's GDB Server It would be nice have more details, including sources. 
查看全文
i.MX 12.1 的配置工具:Ubuntu 无法定位 python 你好 我正在使用 i.MX ubuntu 12.1 版的配置工具计算内存时序。我发现创建新项目后,代码预览不起作用,因为找不到 python。swtool.log 显示以下错误之一"Python 路径不存在:/opt/nxp/i.MX_CFG_v12.1/bin/python39"因为安装后只有"/opt/nxp/i.MX_CFG_v12.1/bin/python38" 可用,而 python 的版本是 3.10.0a2+。 请您更正一下。谢谢。 祝你们圣诞快乐 Re: Config Tools for i.MX 12.1: Ubuntu cannot locat python 在尝试生成 `lpddr4_config.c` 时,我还遇到了与 Python 有关的错误 使用 i.MX 配置工具版本 25.06 的 U-Boot 文件。看起来,自 `python3.13` 起,该工具没有提供 正确的 Python 版本。被链接到 `bin` 目录中的 `python3.12`。 在使用 Python 3.13 作为系统宽 python 的 Debian 13 上,我通过替换 `python3.13` 成功生成了配置文件。链接 系统 python 的符号链接。可以使用以下 bash 命令完成: `(cd i.MX_CFG_25.06/bin/python3/bin)&& rm python3.13&& ln -s /usr/bin/python3.13 python3.13)` 此外,`tools`二进制文件必须直接从 `bin` 目录中执行,例如 `(cd i.mx_CFG_25.06/bin &&./tools) Re: Config Tools for i.MX 12.1: Ubuntu cannot locat python 我刚刚注意到的一件事——如果我保存配置, " 错误 DDRC 由于用于配置 DDR 的值错误而无法生成代码!" 消息消失了,但是当我尝试在我的板上运行测试时,我会收到关于缺少 memtool 的消息。 Re: Config Tools for i.MX 12.1: Ubuntu cannot locat python 如果我忽略该信息并尝试运行测试,则会出现以下失败信息: /opt/nxp/i.MX_CFG_v12.1/bin/python38/bin/python:查找 "memtool.s "模块规范时出错(模块未找到错误:没有名为 "memtool "的模块)。 Re: Config Tools for i.MX 12.1: Ubuntu cannot locat python 谢谢,我已经修复了 tools.ini 文件。 代码包附带的文件夹名为 python38,但是 ini 文件设置为 python39。 这消除了 python 错误,但我又收到了另一个错误: "错误 DDRC 由于用于配置 DDR 的值错误,导致代码生成失败!" 我已将所有值设置为 MX8M Mini evk 的默认值,但仍出现此错误。 每次尝试调整数值时,我都会收到一条信息,提示"不支持指定的数值" 。 当我使用基于 Windows 的工具时,同样的值也能正常工作。 唐 Re: Config Tools for i.MX 12.1: Ubuntu cannot locat python 你好 你可以在 tool.ini 中设置自己的路径,即 -Dpython.dir=python39(/opt/nxp/i.MX_CFG_v12.1/bin)它也应该可以工作。但据我了解,故障(也许是复制粘贴)是可以解决的。 新年快乐 Re: Config Tools for i.MX 12.1: Ubuntu cannot locat python 我也有同样的问题。 有什么新进展吗?
查看全文
关于 i.MX RT1060 功能和 SDK 支持的技术说明 亲爱的恩智浦团队 我们目前正在评估恩智浦 i.MX RT1060,项目涉及以太网通信、显示集成、USB 外围设备、工业协议和音频输出。我们查看了文档和 SDK 产品,希望您能澄清以下技术问题: 1.LVDS 显示器支持: i.MX RT1060 能否直接与 LVDS 显示器连接,或者是否需要外部 RGB 转 LVDS 桥接 IC(如 SN65DSI83)?此外,是否有支持 LVDS 显示器的 SDK 示例? 2.摄像头输入: i.MX RT1060 本机是否支持 USB-UVC 摄像头?如果没有,是否有变通方法或 SDK 级解决方案,或者 CSI 接口是唯一的选择? 3.以太网 MQTT: MCUXpresso SDK 是否包含任何演示以太网 MQTT 的示例? 4.Modbus RTU (RS485): 使用类似 SP3485 的 RS485 收发器通过 UART 实现 Modbus RTU(主/从)的推荐方法是什么? 5.音频输出: 对于扬声器输出,是使用 MQS 还是 SAI 与外部编解码器(如 SGTL5000)一起使用更好?哪种方法更稳健、支持度更高?有 SDK 示例吗? 6.XIP 支持(QSPI): 是否支持通过 FLEXSPI2_A 接口从外部 QSPI 闪存就地执行 (XIP)?您能推荐适合这种用途的 QSPI 闪存芯片吗? 7。外设多路复用: 在 196 引脚 MIMXRT1062CVL5B 代码包,软件包上,可在没有引脚冲突的情况下同时使用的最大外围设备(例如 2x CAN、6x UART、3x SPI、3x I²C、ADC、PWM)是多少? 8。OCPP 支持: 是否有任何参考软件堆栈或 SDK 示例可用于在 i.MX RT1060 上实现 OCPP(开放充电点协议)? 9.开发工具: 在 i.MX RT1060 开发中最推荐使用哪种调试器(如 J-Link、P&E Micro)和集成开发环境(如 MCUXpresso、IAR、Keil)? 10。USB 摄像头 SDK: 如果支持 USB-UVC 摄像头,是否有演示视频/图像捕获和显示渲染的示例项目? 11.USB 主机堆栈支持: SDK 是否支持带有 HID、UVC 和大容量存储类驱动程序的 USB 主机模式?是否有随时可测试的示例项目? 12.替代 MCU 建议: 如果 i.MX RT1060 不能满足上述所有要求(以太网、LVDS、RS485、CAN、音频、MQTT),您能否推荐一款具有类似或更好的外设集成度以及兼容 SDK 和 IDE 的恩智浦替代 MCU? 如果您能就上述问题提供指导,帮助我们选择最适合我们应用的 MCU,我们将不胜感激。 期待您的回复。 提前谢谢您。 致以最崇高的敬意 Pandiyan T. Re: Technical Clarification on i.MX RT1060 Capabilities and SDK Support 你好@Panidiyan_T、 感谢您提供的最新信息。 如果您不介意,请为您的新问题创建一个新案例。 感谢您的理解与合作。 顺祝商祺! MayLiu Re: Technical Clarification on i.MX RT1060 Capabilities and SDK Support 你好,MayLiu、 感谢您的详细答复。 根据你的建议,我们计划继续开发i.MX RT1170 MCU,从EVKB评估板开始。 请澄清有关 RT1170 的以下几点: USB UVC 摄像机支持 i.MX RT1170 是否支持符合 UVC 标准的 USB 摄像机? 如果是,是否有任何 SDK 示例可用于捕获和显示相机输入? 如果没有,您能否提供有关如何使用USB主机堆栈实现UVC支持的任何指导、应用笔记或参考? LVDS 显示集成 我们计划使用RGB 转 LVDS 桥接 IC(如 SN65DSI83)进行显示。 在 i.MX RT1170 EVKB 上使用此类桥接 IC 配置RGB LCDIF 接口时,是否有任何 SDK 示例或指南? 以太网 MQTT MCUXpresso SDK 中是否有专门针对 RT1170 的以太网 MQTT 通信示例项目? 如果您能分享任何参考设计、SDK 路径或应用笔记,我们将不胜感激。 再次感谢您的支持。 致以最诚挚的问候, PandiyanT Re: Technical Clarification on i.MX RT1060 Capabilities and SDK Support 你好@Panidiyan_T、 感谢您对恩智浦半导体产品的关注并有机会为您服务。 答 1: i.MX RT1060 本身不支持 LVDS 接口,需要外接 RGB 转 LVDS 桥接芯片。有关详细信息,请参阅 RT1060RM 文档中的第 35 章 - 增强型 LCD 接口 (eLCDIF)。 答 2: 恩智浦 SDK 库不包括 USB-UVC 示例。我建议参考以下应用笔记。RT1060 和 RT1050 属于同一个系列,具有相似的架构。 开发基于 i.MX RT1050 的简单 UVC 设备 答 3: 是,恩智浦 SDK 包含一个演示以太网 MQTT 的示例。 https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/evkbmimxrt1060/lwip_examples/lwip_mqtt/freertos 答 4: 恩智浦 SDK 演示不包括相关示例。我们对由此造成的不便深表歉意。 答案 5: 我建议使用 SAI,请注意必须连接外部编解码器。 问题 6. XIP 支持(QSPI): 通过 FLEXSPI2_A 接口,外部 QSPI 闪存是否支持就地执行 (XIP)?您能推荐适合这种用途的 QSPI 闪存芯片吗? 答案 6:i.MXRT1060 仅支持通过 FlexSPI1 启动的或非闪存。详情请参阅以下链接 痞子衡嵌入式:恩智浦i.MX RT1xxx系列MCU启动那些事(11.B)- FlexSPI NOR连接方式大全(RT1060/1064(SIP)) - 痞子衡 - 博客园 答 7: 我认为不能同时启用所有外设,因为有些引脚是共享的。 如果您配置了最大可能的外设,RT1060 能够支持这些外设。 答 8: 很抱歉,我们还没有 RT 的直接 OCPP(开放式充电点协议)示例,但我认为这是软件工程师的工作。 答 9: RT1060 芯片支持以下调试器和集成开发环境,请根据需要选择。 调试器:SEGGER J-Link , P&E Multilink , MCU-Link IDE: MCUXpresso IDE ,Keil MDK ,IAR。 答案 10: 请参考答案 2 答案11:恩智浦SDK支持USB主机模式;但是,其他一些驱动程序需要手动集成,没有完整的示例可供参考。 有关 SDK 的更多信息,请参阅以下链接。 https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/evkbmimxrt1060 答 12: RT1064 芯片具有 4MB 片上闪存,保持了与 RT1060 相同的内核规格,同时无需外部闪存配置。 如果想增强性能,我建议考虑升级后的 RT1170 系列,它的功能比前几代产品要先进得多。 希望它能帮到你。 如果您还有疑问,请告诉我。 祝你愉快 敬上 MayLiu
查看全文
符号なしRTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは、 SW32K1_S32M24x_RTD_4.4_3.0.0_QLP0 2 で問題が発生しましたNXP Web ページからダウンロードした SW を Tresos ツールで実行します。 プラグインは署名されていません。01バージョンにも署名されていません。 C\NXP\AUTOSAR\SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02\eclipse\plugins\BaseNXP_TS_T40D2M30I0R0/config/BaseNXP.xdmには署名が必要です。 私もお客様もこの問題に気づいています。 問題を調査していただけますか? よろしくお願いいたします。 ピーター RTD Re: Unsigned RTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは、ダン。 この問題はいつ修正されるかご存知ですか?私のお客様も、「このモジュールのライセンスがありません」という同じエラー メッセージに遭遇しました。 よろしくお願いいたします ロビン Re: Unsigned RTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは@petervlnaさん、 会議で議論されたように、この問題はデフォルトのインストール パスを維持することで修正されます。そしておそらく、EB Tresos にはこのパスの変更に関するチェック条件があります。 よろしくお願いいたします。 ダン Re: Unsigned RTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは、 お客様からのフィードバックは次のとおりです: RTD3.0.0 のみをインストールするクリアなマシンにすべてのパッケージのインストールを再試行します。リンクフォルダにはRTD 3.0.0がありますライセンスコードは以下のように表示されます。   また、管理者権限で EB を開こうとしましたが、3.0.0 も開けません。 3.0.0以降のすべてのモジュール同じ問題「ライセンスなし」があります。   プラグインは署名されているとのことですが、この問題の原因は何でしょうか? 奇妙なことに、署名されていないプラグインに関するお客様からの報告と同じ動作も見られます。これ以外にも他の RTD は正常に動作します。 私が見たものは次のとおりです。 同じセットアップで S32K3 RTD を問題なく開くことができ、MPC57xx プロジェクトも同様です... SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 / 01 RTD を除き、署名の問題は報告されていません。 よろしくお願いいたします。 ピーター Re: Unsigned RTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは@petervlnaさん、 P02の最新ドライバダウンロードで試してみました。 管理者権限で EB Tresos を閉じて再度開いてみていただけますか? 問題が解決しない場合は、「C:\EB\tresos\links」内のSW32K1_S32M24x_RTD_4.4_3.0.0_QLP02.linkファイルにパッケージへのパスが含まれているかどうかを確認してください(リンクファイルの内容:パス=C:/NXP/SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02) 「links」フォルダに複数のS32K1リンクファイルが含まれている場合は、SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02.linkと異なるS32K1リンクファイルをすべて削除してください。 その後、EB Tresos を再度開いて再試行してください。 よろしくお願いいたします。 ダン Re: Unsigned RTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは、 あなたが示したものと同じライセンスを所有しています。 私はtresos 28.2を使用しています。 ドライバは新しくインストールされましたが、署名の問題はまだ存在しています。 読み込み中 ドライバ構成を開こうとすると、エラーが発生します。 P02 の最新のドライバをダウンロードして試しましたか、それとも以前にインストールしたものを実行しただけですか? なぜなら、お客様も私も今この問題に気づいているからです。 よろしくお願いいたします。 ピーター Re: Unsigned RTD - SW32K1_S32M24x_RTD_4.4_3.0.0_QLP02 /01 こんにちは@petervlnaさん、 EB 29.0.0 であなたの懸念を確認しましたが、説明どおりの問題は発生しませんでした。NXP Web サイトで最新の EB Tresos ライセンスを取得しましたか? はいの場合は、ライセンスをダブルクリックして、署名があるかどうかを確認してください。 ライセンスが上記の画像と同じで問題が発生した場合は、ドライバで変更された構成ファイルがある可能性があります。パッケージをアンインストールし、その後再インストールして再試行してください。 よろしくお願いいたします。 ダン
查看全文
LPCXPRESSO LPC2103 ISPプログラミング こんにちは。LPCXPRESSO を使用して LPC2103 用の小さなコード プロジェクトを作成しました。UART0 インターフェース経由で ISP をプログラムしたいです。しかし、LPCEXPRESSO のどの出力ファイルを UUENCODE してからプログラムする必要がありますか? クル オイステイン Re: LPCXPRESSO LPC2103 ISP programmig こんにちは@oykrさん、 プロジェクトをビルディングすると、デバッグ フォルダーが作成されます。その中には.axfファイルがありますプロジェクトのバイナリを生成するために使用できるファイルです。 このバイナリを使用して、MCU をプログラムできます。 よろしくお願いします、 パブロ
查看全文
i.MX6SX SABRE-SDボード上のMercury DAC用オーディオコマンド支援の依頼 こんにちは 私は現在、Mercury および Radion チューナー チップを統合した i.MX6SX SABRE-SD ボードを使用しています。両方のチューナー チップが正常に起動したことをお知らせします。しかし、オーディオ出力に問題が発生しており、現在は機能していません。 回路図を確認すると、Mercury DAC が X7 出力にコネクテッドされていることに気付きました。さらに進むには、この DAC を介してオーディオ出力を有効にしてトラブルシューティングするために必要な適切なオーディオ コマンドまたは構成手順を共有していただければ幸いです。 このマターに関してあなたのご助力は非常に貴重であり、深く感謝いたします。 どうぞよろしくお願いいたします。 よろしくお願いします、 ジョセフ・クリストファー Re: Request for Audio Command Assistance for Mercury DAC on i.MX6SX SABRE-SD Board こんにちは、 これらの製品はMass Marketではないため、当社ではこれらの部品番号の情報にアクセスできないため、お近くの FAE にお問い合わせすることをお勧めします。 よろしくお願いいたします。 Re: Request for Audio Command Assistance for Mercury DAC on i.MX6SX SABRE-SD Board こんにちは@JorgeCas ご返答ありがとうございます。 このメッセージに回路図を添付しましたので、機会があればご覧ください。 よろしくお願いします、 ジョセフ・クリストファー Re: Request for Audio Command Assistance for Mercury DAC on i.MX6SX SABRE-SD Board こんにちは、 回路図の接続を共有していただけますか? よろしくお願いいたします。
查看全文