Multi Source Translation Content

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi Source Translation Content

Discussions

Sort by:
一个 arduino 中的 2 个 mpr121 传感器 -> 串行通信 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 我正在尝试连接 2 个(0x5A、0x5B)地址。 在代码和数据表中,只需将 addr 引脚连接到(默认为 3.3v)就可以进行通信。 Arduino 可以识别其他传感器,但无法同时读取两个触摸传感器。只是告诉我 i=0 ~ 11 如何让 i=12~23 运行? 如何在代码中区分两个传感器? mpr121 传感器与 mpr121 传感器之间可以通信吗? 我非常想知道如何在一个 arduino 中连接两个传感器。 我还尝试用 i2c 扫描仪检查线路 奇怪的是,串行监测只告诉我一个传感器。 这是我的代码 我是否应该在第一处添加一些定义以示区别? 或 转换环 为{ } 请尽快告诉我 X( ------------------------------------------------------------------------------------------------------------------------------------ #include"SoftwareSerial.h" //#define defaultPatch 15 //악기 초기화 버튼 설정 악기호 SoftwareSerial mySerial(2, 3); //SW시리얼핀 정의 D3이 MIDI신호 전송용, D2는 미사용 字节音符 = 0; //MIDI 音符 () 字节 resetMIDI = 4;//VS1053 重置字节 LED 引脚 = 13; //MIDI 音符 LED LED LED #include #include"Adafruit_MPR121.h" #ifndef _BV #define _BV(bit) (1<< (bit)) #endif Adafruit_MPR121 cap = Adafruit_MPR121(); #define MPR121addr 0x5A #define MPR121addr 0x5B uint16_t lasttouched = 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}; 字节字节数据; void setup() { Serial.begin(9600); mySerial.begin(9600); /* while (!Serial) { // 需要防止 leonardo/micro 启动过快! delay(10); } */ Serial.println("Adafruit MPR121 电容式触摸传感器测试"); // 默认地址为 0x5A,如果绑在 3.3V 上,则为 0x5B // 如果绑在 SDA 上,则为 0x5C,如果绑在 SCL 上,则为 0x5D if (!cap.begin(0x5A)) { Serial.println("MPR121-A未找到,请检查接线?"); while (1); } Serial.println("MPR121-Afound!"); // if (!cap.begin(0x5B)){ Serial.println("MPR121-B未找到,请检查接线?"); while (1); } Serial.println("MPR121-B"); //重置 VS1053 pinMode(重置 MIDI,输出); digitalWrite(重置 MIDI,LOW); 延迟(100);dig italWrite(重置 MIDI,HIGH);延 迟(100); } void loop () {currtouched = cap.touched (); for (uint8_t i=0; i<12; i++) { // it if *is* touched and *wasnt* touched before, alert! if ((currtouched& _BV(i))&& !(lasttouched& _BV(i)) ){ Serial.print(i);Serial.println("touched"); // tone(0, btn[i],100); noteOn(0, btn[i],100); //tone(buzzerPin, frequency[i], 330); } } for (uint8_t i=12; i<24; i++) { // 如果*被*触及且*之前未*触及,则发出警报! if ((currtouched& _BV(i))&& !(lasttouched& _BV(i)) ){ Serial.print(i); Serial.println(" touched"); // tone(0, btn[i],100); noteOn(0, btn[i],100); //tone(buzzerPin, frequency[i], 330); } } //*************** MIDI LOOPBACK ******************// if(Serial.available()> 0) { byteData = Serial.read(); mySerial.write(byteData); } lasttouched = currtouched; 返回; } //发送 MIDI 音符开启信息。就像按下钢琴键一样 //通道范围从 0-15 void noteOn(字节通道、字节音符、字节攻击力度){t alkMIDI ((0x90 | 通道)、音符、attack_velocity);} //发送 MIDI 音符关闭信息。比如释放钢琴键 void noteOff(字节通道、字节音符、字节释放_速度){t alkMIDI ((0x80 | 通道)、音符、release_velocity);} //播放一个 MIDI 音符。不检查 cmd 是否大于 127,或者数据值是否小于 127 void talkMIDI(字节 cmd,字节数据 1,字节数据 2){d igitalWrite(ledPin,HIGH);mySerial.Write (cmd) ); mySerial.write(data1); //有些命令只有一个数据字节。所有小于 0xBN 的命令都有 2 个数据字节 //(有点像:http://253.ccarh.org/handout/midiprotocol/) if( (cmd& 0xF0)<= 0xB0) mySerial.write(data2)); digitalWrite(ledPin, LOW); } 触摸传感器 Re: 2 mpr121 sensors in one arduino -> serial communication 我只有一个 MPR121,所以无法尝试代码,但我认为应该像下面这样更改: for (uint8_t i=0; i<12; i++) { // it if *is* touched and *wasnt* touched before, alert! if ((currtouched& _BV(i))&& !(lasttouched& _BV(i)) ){ Serial.print(i);Serial.println("touched"); // tone(0, btn[i],100); noteOn(0, btn[i],100); //tone(buzzerPin, frequency[i], 330); } } for (uint8_t i=0; i<12; i++) { // it if *is* touched and *wasnt* touched before, alert! if ((currtouched2 & _BV(i))&& !(lasttouched2& _BV(i)) ){ //when sensor is touched do something Serial.print(i+12);Serial.println("touched"); noteOn(0, btn[i],100); } } MPR121 有 12 个输入端,"_BV(bit) "位参数应始终介于 0-12 之间,然后使用currtouched2选择不同的 ADDR。 Lib's line-230:https://github.com/adafruit/Adafruit_MPR121/blob/master/Adafruit_MPR121.cpp Re: 2 mpr121 sensors in one arduino -> serial communication 我已经将两个 MPR121 板连接到我的 Arduino Uno,地址为 0x5C 和 0x5A。板可以正确识别。但是,我想了解如何将两块板设置为自动配置模式,以及如何调整两块板上每个传感器的触摸和版本阈值。目前我使用.CPP 文件进行这些设置,但它似乎只能在 0x5a 地址板上使用。谢谢! Re: 2 mpr121 sensors in one arduino -> serial communication <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,金、 很高兴听到你设法将所有四个 MPR121 传感器连接在同一 I2C 总线上。 我不太清楚您当前的问题,但我想您可以根据当前与之通信的传感器地址,在 sw 中轻松完成。 顺祝商祺! 托马斯 Re: 2 mpr121 sensors in one arduino -> serial communication <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 瓦切尔卡先生 非常感谢 联系的可能性让我松了一口气。 感谢您的热情回复,我成功连接了所有 4 个 mpr121 传感器!.....! 我面临的最后一个问题是,"将触摸按钮的数量扩展到 24 个。" 每个触摸传感器都会给出 0 到 11 的数值。 我怎样才能做到 0-11、12-23、24-35、36-47? ----------------------------------------------------------------------------------------------------------------------------------------------------- #include"SoftwareSerial.h" //#define defaultPatch 15 //악기 초기화 버튼 설 정 악기호 SoftwareSerial mySerial(2, 3); //SW시리얼핀 정의 D3이 MIDI신호 전송용, D2는 미사용 字节音符 = 0; //MIDI 音符 () 字节 resetMIDI = 4;//VS1053 重置字节 LED 引脚 = 13; //MIDI 音符 LED LED LED #include #include"Adafruit_MPR121.h" #ifndef _BV #define _BV(bit) (1<< (bit)) #endif //一条 i2c 总线上最多可以有 4 个,但一根足够测试! adafruit_mpr121 上限 = adafruit_mpr121 ();adafruit_mpr121 cap2 = adafruit_mpr121 ();adafruit_mpr121 cap3 = adafruit_mpr121 (); adafruit_mpr121 cap4 = Adafruit_mpr121 (); //记录上次触摸的引脚/ /这样我们就知道按钮何时 “版本” uint16_t lasttouched = 0; uint16_t currtouched = 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}; 字节字节数据; void setup() { Serial.begin(9600); mySerial.begin(9600); while (!Serial) { // 需要防止 leonardo/micro 启动过快! delay(10); } Serial.println("Adafruit MPR121 电容式触摸传感器测试"); // 默认地址为 0x5A,如果绑在 3.3V 上,则为 0x5B // 如果绑在 SDA 上,则为 0x5C,如果绑在 SCL 上,则为 0x5D if (!cap.begin(0x5A)) { Serial.println("MPR121-A未找到,请检查接线?"); while (1); } Serial.println("MPR121-Afound!"); // 如果 (!cap2.begin(0x5B)){ Serial.println("MPR121-B未找到,请检查接线?"); while (1); } Serial.println("MPR121-Bfound!"); // 如果 (!cap3.begin(0x5C)){ Serial.println("MPR121-C未找到,请检查接线?"); while (1); } Serial.println("MPR121-Cfound!"); // 如果 (!cap4.begin(0x5D)){ Serial.println("MPR121-D未找到,请检查接线?"); while (1); } Serial.println("MPR121-D找到了!"); //RESET VS1053 pinMode(RESET MIDI,输出); digitalWrite(resetMIDI,LOW); 延迟(100); digitalWrite(resetMIDI,HIGH); 延迟(100); //这是循环内部所以你可以热插板 //如果你不需要热插件你可以把它放到设置中 () cap.begin (0x5A);cap2.begin (0x5B) ; cap3.begin(0x5C); cap4.begin(0x5D); } void loop() { // 获取当前触摸的焊盘 currtouched = cap.touched(); currtouched2 = cap2.touched(); currtouched3 = cap3.touched(); currtouched4 = cap4.touched(); f@@ or (uint8_t i=0; i < 48; i++) { //如果 *被*触摸过而且 *以前没有*触摸过,警报! i f ((currtouched & _BV (i)) & &!(las t touched & _BV (i))) {Serial.Print (i);Serial.println (" touched "); //音调 (0,btn [i] ,100);/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////i f ((currtouched2 & _BV (i)) & &!(lasttouched2 & _BV (i))) {//当触摸传感器时做点什么 Serial.print (i);Serial.println (" touched ");n oteOn (0,btn [i] ,100);}/////////////////////////////////////////////////////////////////////////////////////////////////////////////V (i)) && &!(lasttouched3 & _BV (i))) {//当触摸传感器时做点什么 Serial.print (i);Serial.println (" touched ");n oteOn (0,btn [i] ,100);}//////////////////////////////////////////////////////////////////////////////////////////////////////////////(i)) && &!(lasttouched4 & _BV (i))) { //当触摸传感器时做点什么 Serial.print (i); Serial.println (" 触摸 "); n oteOn (0, btn [i] ,100); } } //RESET我们上次触摸的状态 = currtouched2; lasttouched3 = currtouched3; lasttouched4 = currtouched4; retur n; //***************** MIDI LOOPBACK ********************/// if (Serial.Available > 0) { byteData = Serial.read(); mySerial.write(byteData); } } //发送 MIDI 音符开启信息。就像按下钢琴键一样 //通道范围从 0-15 void noteOn(字节通道、字节音符、字节攻击力度){t alkMIDI ((0x90 | 通道)、音符、attack_velocity);} //发送 MIDI 音符关闭信息。比如释放钢琴键 void noteOff(字节通道、字节音符、字节释放_速度){t alkMIDI ((0x80 | 通道)、音符、release_velocity);} //播放一个 MIDI 音符。不检查 cmd 是否大于 127,或者数据值是否小于 127 void talkMIDI(字节 cmd,字节数据 1,字节数据 2){d igitalWrite(ledPin,HIGH);mySerial.Write (cmd) ); mySerial.write(data1); //有些命令只有一个数据字节。所有小于 0xBN 的命令都有 2 个数据字节 //(有点像:http://253.ccarh.org/handout/midiprotocol/) if( (cmd& 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 总线上的两个 MPR121 传感器通信,以便将触摸按钮的数量扩展到 24 个。 实际上,根据 ADDR 引脚的连接情况,您可以为 MPR121 分配四个 I2C 地址:   例如,当 ADDR=VDD(写入时转换为 0xB4,读取时转换为 0xB5)时,一个 MPR121 从属服务器的 7 位 I2C 地址为 0x5A,当一个 ADDR=GND 时,另一个从 I2C 地址为 0x5B(写入转换为 0xB6,读取时转换为 0xB7)。 希望对你有所帮助! 顺祝商祺! 托马斯
View full article
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の機能とヒント
View full article
PFE on S32G A53 QNX ERROR     Hi,NXP experts We have a custom board that we want to run QNX and PFE drivers on. But we have encountered the following problem and would like to ask PFE experts to help analyze it.     software information: PFE QNX driver version: 1.8.0 PFE FW version: 1.11.0 QNX SDP version: 7.1.0 BSP version of QNX S32G399A: BSP_nxp-s32g-rdb3_br-710_be-710_SVN996606_JBN10   hardware information: The difference in hardware between us and the NXP S32G399ARDB3 EVN board is that DDR has been changed to 2GB, and we have already adapted it in Linux, and the pfe Ethernet driver is normal. The changes are as follows:           1. Changes in images/s32g399a-rdb.build file,   2. Changes in src\hardware\startup\boards\s32g\s32g399a-rdb\s32g_init_raminfo.c file:     3. Other insignificant changes, unrelated to the PFE driver.       My test commands are: # 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/s32g_pfe_class.fw,util_fw=/proc/boot/s32g_pfe_util.fw   However, after running, the error message appears.Log is here. -------------------Appendix------------------     NOTICE:  The list of clocks found enabled during the SCMI agent reset command: NOTICE:         linflex_lin NOTICE:         usdhc_core board_smp_num_cpu: 8 cores MMU: 16-bit ASID 40-bit PA TCR_EL1=b5183519 ARM GIC-500 r1p1, arch v3.0 detected board_smp_num_cpu: 8 cores board_smp_num_cpu: 8 cores No SPI intrinfo. Add default entry for 32 -> 575 vectors, 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 Icache 32K linesz=64 set/way=256/2 cpu0: L1 Dcache 32K linesz=64 set/way=128/4 cpu0: L2 Unified 1024K linesz=64 set/way=1024/16 board_smp_num_cpu: 8 cores   A53 CORE CLOCK : 1000MHz DDR CLOCK      : 800MHz SERDES CLOCK   : 2000MHz LINFLEXD CLOCK : 125MHz GMAC TS CLOCK  : 48MHz SPI CLOCK      : 48MHz QSPI CLOCK     : 800MHz SDHC CLOCK     : 800MHz   Loading IFS...decompressing...done board_smp_start: cpu_cluster_id: 0, cpu_id: 1 NOTICE:  S32 TF-A: s32_pwr_domain_on: booting up core 1 (0)  running 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 Icache 32K linesz=64 set/way=256/2 cpu1: L1 Dcache 32K linesz=64 set/way=128/4 cpu1: L2 Unified 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) nning 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 Icache 32K linesz=64 set/way=256/2 cpu2: L1 Dcache 32K linesz=64 set/way=128/4 cpu2: L2 Unified 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id: 0, cpu_id: 3 ngTICE:  SS32TT-A:: 32_pwr_rodain_on: booting up cpre 3 (0n 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 Icache 32K linesz=64 set/way=256/2 cpu3: L1 Dcache 32K linesz=64 set/way=128/4 cpu3: L2 Unified 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id: 1, cpu_id: 0 NOTICE:  S32 TF-A: s32_pwr_domain_on: booting up core 4 (0) NOTICE:  S32 TF-A: s32_pwr_domain_on_finish: cpu 4 running 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 Icache 32K linesz=64 set/way=256/2 cpu4: L1 Dcache 32K linesz=64 set/way=128/4 cpu4: L2 Unified 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id: 1, cpu_id: 1 NOTICE:  S32 TF-A: s32_pwr_domain_on: booting up core 5 (0) cpu 5 running 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 Icache 32K linesz=64 set/way=256/2 cpu5: L1 Dcache 32K linesz=64 set/way=128/4 cpu5: L2 Unified 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id: 1, cpu_id: 2 NOTICE:  S32 TF-A: s32_pwr_domain_on: booting up core 6 (0) nning 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 Icache 32K linesz=64 set/way=256/2 cpu6: L1 Dcache 32K linesz=64 set/way=128/4 cpu6: L2 Unified 1024K linesz=64 set/way=1024/16 board_smp_start: cpu_cluster_id: 1, cpu_id: 3 NOTICE:  S32 TF-A: s32_pwr_domain_on: booting up core 7 (0) 7 running 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 Icache 32K linesz=64 set/way=256/2 cpu7: L1 Dcache 32K linesz=64 set/way=128/4 cpu7: L2 Unified 1024K linesz=64 set/way=1024/16   System page at phys:00000000a0010000 user:ffffff8040315000 kern:ffffff8040311000 Starting next program at vffffff8060097300 ClockCycles samples:  0 62957977  1 62957977  2 62957978  3 62957977  4 62957977  5 62957977  6 62957977  7 62957977 All ClockCycles offsets within tolerance Welcome to QNX Neutrino 7.1.0 on the NXP S32G399A RDB Board!! Starting watchdog... Starting serial driver ... Starting Networking driver (/dev/socket)... Starting SPI driver (/dev/spi0,1,2,3,4,5)... Starting I2C 0/1/2/3/4 driver (/dev/i2c0,1,2,3,4)... Starting USDHC0 memory card driver... Path=Starting CAN driver... 0 - imx  target=0 lun=0     Direct-Access(0) - SDMMC: AAM20E Rev: 1.0 # # # # slog2info -c   Process 4117 (slog2info) exited status=0. ghccu# slog2info -w & [1] 12309                                           random.4                  low     0  -----UNSYNC-----                                           random.4                 high     0  -----UNSYNC----- Jan 01 00:00:00.022                      console.3                           0  -----ONLINE-----                                          console.3                  out     0  -----UNSYNC----- Jan 01 00:00:00.027                       random.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/s32g_pfe_class.fw,util_fw=/proc/boot/s32g_pfe_util.fw # 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 is supported! Jan 01 00:00:14.061                    iopkt.16408          main_buffer      0  tcpip starting Jan 01 00:00:14.062                    iopkt.16408          main_buffer      0  smmu support is disabled Jan 01 00:00:14.063                    iopkt.16408          main_buffer      0  initializing 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: Initialized Security Association Processing.   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 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]: VERSION INFO         Driver version: 1.8.0         Driver commit hash: 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]: --- Safe IRQ enabled. No InterrupAttach() or InterruptAttach_r() allowed.   Jan 01 00:00:14.068             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_fw.c:94]: 45724 bytes read   Jan 01 00:00:14.068             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_fw.c:100]: Loaded firmware file: /proc/boot/s32g_pfe_class.fw   Jan 01 00:00:14.068             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_fw.c:94]: 23352 bytes read   Jan 01 00:00:14.069             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_fw.c:100]: Loaded firmware file: /proc/boot/s32g_pfe_util.fw   Jan 01 00:00:14.069             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_drv.c:1449]: MII mode configuration for pfe0/EMAC0 not found. Using SGMII.   Jan 01 00:00:14.069             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_drv.c:1449]: MII mode configuration for pfe1/EMAC1 not found. Using SGMII.   Jan 01 00:00:14.069             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_drv.c:1449]: MII mode configuration for pfe2/EMAC2 not found. Using SGMII.   Jan 01 00:00:14.069             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_drv.c:1467]: Issuing PFE peripheral reset...   Jan 01 00:00:14.179             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_drv.c:1468]: PFE reset OK.   Jan 01 00:00:14.179             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2826]: PFE CBUS p0x46000000 mapped @ v0x1e2a574000 (0x1000000 bytes)   Jan 01 00:00:14.179             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2831]: HW version 0x101   Jan 01 00:00:14.179             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_hw_feature.c:95]: Silicon S32G3   Jan 01 00:00:14.179             io_pkt_v6_hc.16408                 slog      0  WRN[hw/s32g/pfe_platform_master.c:2843]: Fail-Stop mode disabled   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2093]: PFE_ERRORS:Parity instance created   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2108]: PFE_ERRORS:Watchdog instance created   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2124]: PFE_ERRORS:Bus Error instance created   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2137]: PFE_ERRORS:FW Fail Stop instance created   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2150]: PFE_ERRORS:Host Fail Stop instance created   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:2163]: PFE_ERRORS:Fail Stop instance created   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 instance created   Jan 01 00:00:14.254             io_pkt_v6_hc.16408                 slog      0  INF[hw/s32g/pfe_platform_master.c:1097]: BMU1 buffer base: 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: Can't get memory block   Jan 01 00:00:14.255             io_pkt_v6_hc.16408                 slog      0  ERR[hw/s32g/pfe_platform_master.c:1125]: (DRIVER) event 1 - Driver runtime error: Unable to get BMU2 pool memory   Jan 01 00:00:14.256             io_pkt_v6_hc.16408                 slog      0  ERR[src/pfe_drv.c:1529]: (DRIVER) event 1 - Driver runtime error: Unable to initialize the platform   Jan 01 00:00:14.257                    iopkt.16408          main_buffer      0  Unable to init /proc/boot/devnp-pfe-2.so: No such device   Jan 01 00:00:14.257             io_pkt_v6_hc.16408                 slog      0  INF[src/pfe_drv.c:1302]: PFE entry failed, PFE driver terminated     # # # # # #     Re: PFE on S32G A53 QNX ERROR Hello, @SandalWood  I feel very sorry for late response. Not sure if the issue has been resolved? May I know if there was a environment variable skip_scmi_reset_agent set in your uboot? If not, try setting the following: "setenv skip_scmi_reset_agent '1'" BR Chenyin   Re: PFE on S32G A53 QNX ERROR Hello, @SandalWood  Thanks for the reply. 1. I suggest reviewing the "PFE_QNX_DRV_IntegrationManual.pdf", which is included in PFE driver release package and assure that each step(Building, Running driver) is correct. 2. If the DTB file worked well in Linux, then the original one in QNX should be replaced with it. Would you mind trying it again and let me know the test result. BR Chenyin Re: PFE on S32G A53 QNX ERROR Hello, @SandalWood  Thanks for you reply. Yes, I understand the situation now. Will investigate it and reply you later when there are any findings. BR Chenyin Re: PFE on S32G A53 QNX ERROR 1.The location of the pfe DDR cannot use the example provided in the NXP manual and must be changed to an idle location to prevent overlap with the reserved memory. 2.I haven't made any dynamic changes.My run cmd is: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.fw,util_fw=/proc/boot/s32g_pfe_util.fw And I did not make any dynamic changes, I did not modify the environment variables of uboot. Linux and QNX use the same uboot image. So, I understand that the configuration of Serdes on QNX should be the same as Linux, right?  Re: PFE on S32G A53 QNX ERROR Hello, @SandalWood  Glad that the ddr issue resolved, would you mind sharing the reasons? For the ping issue mentioned, have you mentioned the driver limitation below: BR Chenyin Re: PFE on S32G A53 QNX ERROR Hi, We have resolved the ddr error, but there may be an new issue during ping. The pfe0 in our board is directly connected to the external swtich through MAC-TO-MAC(SGMII MODE). In a Linux environment, this link is normal and can communicate with the external environment normally, such as ping being OK. But after replacing Linux with the current QNX, the ping problem will occur. In Linux, we changed the device tree and configured pfe0 to fix sgmii mode. I suspect it's related to this, but I don't know how to configure it in QNX。 The log please see the attach. Re: PFE on S32G A53 QNX ERROR 160 is hex 0xa0,it seems that pfe_ddr is ok # pidin sys=asinfo Header size=0x00000108, Total Size=0x00001050, #Cpu=8, Type=257 Section:asinfo offset:0x00000b90 size:0x00000200 elsize:0x00000020 0000) 0000000000000000-0000ffffffffffff o:ffff a:0010 p:100 c:0 n:/memory 0020) 0000000000000000-00000000ffffffff o:0000 a:0010 p:100 c:0 n:/memory/below4G 0040) 0000000080000000-00000000ffffffff o:0020 a:0017 p:100 c:0 n:/memory/below4G/ram 0060) 0000000880000000-00000008dfffffff 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-00000000ffffffff 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 Hello, @Chen  Thanks for reply.The return code see the log. BR SandalWood  Re: PFE on S32G A53 QNX ERROR Hello, @SandalWood  Thanks for the post. Seems the memory is not correctly mapped, may I know if there is a log indicating that as_add_containing() was successful called? BR Chenyin
View full article
使用 UUU 闪存 i.MX8MM SD 卡的问题 我一直在尝试在 i.MX8MM 上闪存 SD 卡,但遇到了一些问题。我查看了文档,但并没有完全解开我的困惑。 关于 UUU,我已经下载了最新的 1.4.127 版:https://github.com/NXPmicro/mfgtools/releases/tag/uuu_1.4.127 而且我还下载了最新的预构建的 Linux 二进制文件 L5.10.9_1.0.0_MX8MM:https://www.nxp.com/webapp/Download?colCode=L5.10.9_1.0.0_MX8MM& apptype=License 我使用 UUU 通过以下方式将这个 5.10 Linux 版本闪存到我的 eMMC 中: uuu.exe uuu.auto 闪烁和启动都很正常。然后,我尝试通过更新 uuu.auto 文件将其闪存到 SD 卡,具体方法如下: # SD Programming: FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${sd_dev} FB: ucmd mmc dev ${sd_dev} FB: flash -raw2sparse all imx-image-multimedia-imx8mmevk.wic FB: flash bootloader imx-boot-imx8mmevk-sd.bin-flash_evk FB: ucmd if env exists sd_ack; then ; else setenv sd_ack 0; fi; FB: ucmd mmc partconf ${sd_dev} ${sd_ack} 1 0 FB: done # Emmc programming: #FB: ucmd setenv fastboot_dev mmc #FB: ucmd setenv mmcdev ${emmc_dev} #FB: ucmd mmc dev ${emmc_dev} #FB: flash -raw2sparse all imx-image-multimedia-imx8mmevk.wic #FB: flash bootloader imx-boot-imx8mmevk-sd.bin-flash_evk #FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi; #FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0 #FB: done 在以下步骤中失败了: uuu.exe uuu.auto uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.127-0-g08c58c9 Success 0 Failure 1 2:2 7/ 8 [ ] FB: ucmd mmc partconf ${sd_dev} ${sd_ack} 1 0 这让我觉得我不能简单地把一个换成另一个。所以我的问题是,如何使用 uuu 将 v5.10 预发布的 Linux 二进制文件闪存到 i.mx8mm EVK 上的 SD 卡中? i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Issue flashing i.MX8MM SD card with UUU 我同意,UUU 的文档非常少,如果不反复试验,很难使用。 如果恩智浦能派一名以英语为母语的应用工程师对其进行彻底更新,提供适当的使用案例,并采用标准的 Linux 风格命令行帮助语法,用户将受益匪浅。 我可以帮忙,但自己没有足够的业余时间...... Re: Issue flashing i.MX8MM SD card with UUU 使用脚本没有问题。 你需要的是常见的基本知识。 因为从"FB: ucmd mmc partconf${sd_dev} ${sd_ack} 1 0", 可以了解到你对 emmc 和 SD 卡一无所知,因为你不知道 WIC。 下面是闪存 SD 卡的脚本。uuuuuu.sd.auto,即可使用。 uuu.sd.auto uuu_version 1.2.39 # 此命令将在 i.mx6/7 i.mx8MM、i.mx8MQ SDP: 启动 -f imx-boot-imx-boot-imx8mmevk-sd.bin-flash_evk 时 # 这个命令将在 ROM 支持直播模式时运行 # i.mx8QXP,i.mx8QM SDPS:启动 -f imx- 启动-imx-启动-imx8mmevk-sd.bin-flash_ev k # 使用 SPL 时将运行这些命令,如果没有 spl # SDPU 将被弃用,则跳过这些命令。请使用 SDPV 代替 SDPU # { SDPU:延迟 1000 SDPU:write -f imx-boot-imx8mmevk-sd.bin-flash_evk-offset 0x57c00 SDPU: jump # } # 这些命令将在使用 SPL 时运行,如果没有 spl 则会跳过 # if(SPL 支持 SDPV) # {SDPV:延迟 1000 SDP V:write-f imx-boot-imx8mmevk-sd.bin-flash_evk -skipspl SDPV: jump # } FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev${emmc_sd} FB: ucmd mmc dev${emmc_sd} FB: flash -raw2sparse all imx-image-multimedia-imx8mmevk.wic FB: 已完成 Re: Issue flashing i.MX8MM SD card with UUU 要想知道什么是 wic,你就应该掌握 yocto 知识。 而 wic 与 .sdcard 相同。 Re: Issue flashing i.MX8MM SD card with UUU 谢谢您的建议。如果通过 `.sdcard` 文件闪存,文档和 `uuu` 输出都会提到 sdcard: sd_all burn whole image to sd card arg0: _flash.bin arg1: _rootfs.sdcard 显然,在这种情况下,它是一个 `.wic` 文件。是否有地方提到过,而我却忽略了? 第二个问题:在内置命令起作用的同时,uuu.auto 文件也可以用于 SD 卡刷机吗? Re: Issue flashing i.MX8MM SD card with UUU 使用 uuu 版本命令只需要一个命令行 uuu -b sd_all imx-启动-imx8mmevk-sd.bin-flash_evkimx-image-multimedia-imx8mmevk.wic 建议阅读 uuu 手册或键入 uuu(不带参数)以显示帮助
View full article
RSA usage examples I'm working on a s32k344 board and I'm trying to develop a digital signature verification routine that uses RSA. The aim is to import the RSA public key from outside and use it to verify the signature over a file loaded in flash. Is there any example code that shows how to import RSA key and perform  RSA crypto operations? Thanks Re: RSA usage examples Good morning, I have a similar problem with K32L2B31VLH0A. I would like to validate a signature with 2048-byte RSA or with ECDS, which should require fewer resources for the same result. My problem is insufficient RAM, or at least that's what the NXP mbed TLS library returns. Are there any working examples on this microcontroller, or is 32 KB of RAM not enough? I have four products with this microcontroller and I need to understand if I need to replace the microcontroller or if there are possible solutions. What I need is to be able to validate a signed firmware upgrade. Re: RSA usage examples Hi @niccolentini  See please attached example.  Environment: S32K344 with HSE FW 0_2_40_0 S32DS 3.5 RTD 4.0.0 HF01 EB 29.0 Regards, Lukas
View full article
SysTickタイマーの実行速度が速すぎます <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> MK64FN1M0VLQ12 を使用したデザインがあります。ボードの 1 つが異常な動作をしていますが、他のボードは正常です。 症状としては、SysTick タイマーが明らかに 25 倍速くカウントしているようです。オシロスコープを使用してすべてのクロックを測定したところ(ピン PTA6 に接続)、すべて正しい周波数でした。カウントが速すぎることの証拠は、OSA_TimeDelay() 呼び出しで指定した時間の 1/25 が返されることです。 クロックの構成: EXTAL および XTAL 上の 6.49 MHz 水晶。 PLL は 118.98333 MHz の MCGOUTCLK を生成します。 コアクロック分周比は 1 です。 バスクロック分周比は 2 です。 FlexBus クロック分周器は 4 です。 フラッシュクロック分周比は 8 です。 OSCERCLK (6.49MHz の信号が 2 つの ADC に送られます。 デバッガー (IAR EWARM) を使用して、正常なボードと不良なボードの両方で SysTick 制御およびリロード レジスタを調べました。良いボードと悪いボードの両方で同じ値が表示されます。不良ボード上のすべては正常に動作していますが、MQX 時間遅延がすべて 25 倍短すぎます。 この「不良」ボードは、MCU が交換され、ジャンパー ワイヤがスーパー グルーを使用してボードに接着されるなど、数回にわたって修理されています。このスーパーグルーは JTAG コネクタの下とピンの周囲に塗布されました。MCU が電源投入時にこれらのピンをサンプリングし、インピーダンスがいくらか低いために MCU が文書化されていない動作モードに切り替わる可能性はありますか?リファレンスマニュアルでブートストラップピンに関する記述を検索しましたが、何も見つかりませんでした。 MCU を交換しても問題は解決しませんでした。適切な溶剤でスーパーグルーをすべて除去しても問題は解決しませんでした。 あらゆるご指摘をいただければ幸いです。 Kinetis KシリーズMCU Re: SysTick timer is running too fast なぜこのようなことが起こったのか説明はありますか?現在、S32K344 で MCUBoot を実行しているときに、このクロック速度の問題 (25 倍速すぎる) が発生しています。 Re: SysTick timer is running too fast <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 これまでこの問題に遭遇したことはありません。 OSA_TimeDelay() 関数で設定した値はどうでしょうか? そして、どうすれば予想通りより速く時間遅延を測定できるのか興味があります。 可能であれば、より詳細な情報を提供してもらえますか?ありがとう。 すてきな一日を、 馬慧 ----------------------------------------------------------------------------------------------------------------------- 注: この投稿で質問が解決した場合は、「正解」ボタンをクリックしてください。ありがとう! -----------------------------------------------------------------------------------------------------------------------
View full article
OP-TEEキー こんにちは、 iMX8M miniにYocto BSPを使用しています。ここがこの質問をするのに適切な場所かどうかわかりません。そうでないCASEはお知らせください。 https://source.codeaurora.org/external/imx/imx-optee-os/tree/documentation/porting_guidelines.md?h=imx_4.19.35_1.1.0をご覧ください 私はそれを読むことができます ## 9. Trusted Application private/public keypair By default all Trusted Applications (TA's) are signed with the pre-generated 2048-bit RSA development key (private key). This key is located in the `keys` folder (in the root of optee_os.git) and is named `default_ta.pem`. This key **must** be replaced with your own key and you should **never ever** check-in this private key in the source code tree when in use in a real product.   また、次の場所でもご覧いただけます: https://optee.readthedocs.io/en/latest/building/trusted_applications.html#tas の署名 警告 「optee_os には、開発、テスト、デバッグ、QA を容易にするために、ソースにデフォルトの秘密キーが付属しています。このキーを使用してoptee_osバイナリを本番環境にデプロイしないでください。代わりに、このキーをできるだけ早く公開キーに置き換え、キーの秘密部分をオフラインで、できれば HSM 上に保管してください。」   はい、その後、新しいキーペアを生成し、公開キーを抽出しました。 次に、抽出した公開キーをキー フォルダーに配置し、名前を default_ta.pem に変更して、元の default_ta.pem を上書きします。 つまり、default_ta.pem には現在公開鍵のみが存在することになります。 現在、 optee-os-imx は正しくビルドされますが、 optee-test-imx はエラーを発生させます。これは、信頼できるアプリであり、署名に秘密キーが必要であるため、理解できます。 SO、私の質問は、default_ta.pemを別のKEYPAIR.pemに置き換えたらどうなるでしょうか?私が生成したファイルは安全ですか?optee-os-imx と optee-test-imx は正しくビルドされますが、キーペアの秘密キー部分は optee-os バイナリ ファイルから削除されますか?または、default_ta.pem キーペアはイメージに完全に埋め込まれますか? この最後のCASEでは、ビルド中のソースに秘密鍵を入れないようにという指示と少し衝突することになります。 この部分を処理するスクリプトをCAN教えていただけますか? ご協力の程、よろしくお願い申し上げます。 Re: OP-TEE key Yocto ビルドで HSM を使用して署名するために何を変更する必要があるかわかっている人はいますか? Re: OP-TEE key 私は、Yocto を使用して imx93 にセキュア ストレージを実装する予定です。この投稿に従い、実装方法は明確ですが、次の 2 つの点が明確ではありません。 -ハードウェアユニークキー(HUK)はTEEに既に存在しますか?SO、何もする必要はありません。 - TA を追加する必要がない場合でも、default_ta.pem を変更する必要がありますか?これに関するガイドはありますか?(キー生成 + Yocto での置換) HUK を抽出する方法はないと思うので、デバッグ目的であっても、別のハードウェア (組み込みまたはノートPC) でデータを解読することはできないと思いますが、本当でしょうか? Re: OP-TEE key はい、その通りです@IvanRuiz 。 唯一の問題は、imx-optee-test レシピもビルドし、これには optee-os が必要であり、optee-os ビルド フォルダーから秘密キーを取得しようとすることです。 とにかく、Tee イメージに埋め込む前に、秘密鍵がキーペアから取り除かれることがわかりました。これは次のスクリプトによって実行されます。 pem_to_pub_c.py キーペアから抽出された公開キーの情報のみを含む ac ファイルを生成します。 それが tee.bin ファイルに追加されます。 あなたのドキュメントに従って、私たちは秘密鍵をソースとともにリポジトリにコミットするつもりはありません。 Re: OP-TEE key こんにちは、 セキュリティ上の理由から、 keys/default_ta.pemに秘密鍵を保存することは推奨されません。ドキュメントによると、生成された公開鍵のみを使用することが推奨されています。これは、公開鍵は暗号化にのみ使用され、秘密鍵はできれば HSM に保存されるためです。TA は、ドキュメントに記載されているように、OP-TEE のsign_encrypt.pyを使用して署名されます。 お役に立てれば幸いです! BR、 イワン。
View full article
Reg: Need the Ubuntu OS 22.04 LTS support chipset Dear Team, we got the new opportunity to work in the Robotics based application project where we need the processor which can support Ubuntu OS with 22.04 LTS version with ROS support also. so kindly pls suggest which chipset we can go with.
View full article
S32K3 セーフティ分析レポート こんにちは、NXP S32K3の機能安全について勉強しています。マニュアルによると、セーフティ分析レポートではFMEDA、DFA、FTAを組み合わせることができるとのことです。参考例はどこで入手できますか? よろしくお願いします、 シアンロン Re: S32K3 Safety Analysis Report こんにちは、 実際の FMEDA/DFA/FTA テンプレートまたは例を探している場合は、通常、以下が提供されています。 NDA(秘密保持契約)に基づき NXPサポートまたはお近くのFAE(フィールドアプリケーションエンジニア)を通じて すべてのセーフティ関連文書は、NXP の S32K3 ウェブページの安全なファイルの下にあります。 https://www.nxp.com/products/S32K3?ticket=ST-2386-bOAWTUGgQ9aB9hAx3KqTeCycCAc-nxp#myDocument NXP FAE が直接対応しているので、例については直接問い合わせることをお勧めします。 よろしくお願いいたします。 ピーター
View full article
Error in MIMXRT1170-EVKB mflash_drv.c : Quad mode enable Hi all, there's a bug in the SDK for the EVKB version of the RT1170 eval board. It still persists in the current version 25_06_00. The flash driver (mflash_drv.c) has obviously been ported from the EVK board which contains a different QSPI flash. The LUT enry for writing the status reg is /* Enable Quad mode */ [4 * NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x01, kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_1PAD, 0x04), and the enable quad mode code is #if !defined(XIP_EXTERNAL_FLASH) || defined(MFLASH_FORCE_QUAD_MODE) static status_t flexspi_nor_enable_quad_mode(FLEXSPI_Type *base) { flexspi_transfer_t flashXfer; status_t status; uint32_t writeValue = 0x40; /* Write neable */ status = flexspi_nor_write_enable(base, 0); if (status != kStatus_Success) { return status; } /* Enable quad mode. */ flashXfer.deviceAddress = 0; flashXfer.port = kFLEXSPI_PortA1; flashXfer.cmdType = kFLEXSPI_Write; flashXfer.SeqNumber = 1; flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG; flashXfer.data = &writeValue; flashXfer.dataSize = 1; status = FLEXSPI_TransferBlocking(base, &flashXfer); That is: value 0x40 is written with cmd 0x1. In the older EVK board, the flash chip is ISSI IS25WP128. There, cmd 0x1 writes 0x40 to the status register to set the quad enable bit. In the EVK-B, the flash chip is Winbond W25Q512NW. There, the quad enable bit is located in S9 which is bit 2 of status reg 2. Here, value 0x02 needs to be written with cmd 0x31. Best regards, Rainer Re: Error in MIMXRT1170-EVKB mflash_drv.c : Quad mode enable Hi @hfuhruhurr, Thanks for reporting this. I will look into it and escalate to the SDK team so they can do the appropriate changes on a future release of the SDK for the RT1170-EVKB.
View full article
LittleFS Integration Support on Kinetis K70 with CodeWarrior Dear Sir, We are working on a project using the Kinetis MK70FN1M0VMJ12 MCU with CodeWarrior IDE, and we are planning to use RAW NAND Flash for data storage. We would like to integrate the LittleFS File System for Kinetis MK70FN1M0VMJ12 data storage Application. Our aim is to integrate LittleFS due to its suitability for RAW NAND flash .  While we see that LittleFS is supported in newer SDKs like that for the LPCXpresso54S018 / RW612 MCU in MCUXpresso, we need your assistance to port and integrate LittleFS with the K70 platform in Code Warrior. Kindly provide guidance / Documentation / Application Notes / Example code for Porting Little FS to MK70FN1M0VMJ12 in code warrior. You may also help us to suggest equivalent Filesystem to LittleFS for RAW NAND Flash - data storage ( Except FAT Filesystem ). Thanks & Regards V.Tholkapiyan. Re: LittleFS Integration Support on Kinetis K70 with CodeWarrior Hello @Tholkapiyan , Thanks for your post. For K70, we don't have such examples or application notes for integrating LittleFS into CodeWarrior. Sorry for the inconvenience caused. You can refer to Littlefs LPCXpresso55S16 - NXP Community and the blog of Erich Styger mentioned in it. LittleFS File System with MCU Internal FLASH Memory | MCU on Eclipse I believe they will be very helpful. In addition, you can also consider the YAFFS Filesystem, which is also suitable for RAW NAND flash. I have found the following link for your reference: How to port yaffs2 for MQX - NXP Community Hope it can help you. BRs, Celeste -------------------------------------------------------------------------------------------------------------------- Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you! --------------------------------------------------------------------------------------------------------------------
View full article
LPCXPRESSO LPC2103 ISPプログラミング こんにちは。LPCXPRESSO を使用して LPC2103 用の小さなコード プロジェクトを作成しました。UART0 インターフェース経由で ISP をプログラムしたいです。しかし、LPCEXPRESSO のどの出力ファイルを UUENCODE してからプログラムする必要がありますか? クル オイステイン Re: LPCXPRESSO LPC2103 ISP programmig こんにちは@oykrさん、 プロジェクトをビルディングすると、デバッグ フォルダーが作成されます。その中には.axfファイルがありますプロジェクトのバイナリを生成するために使用できるファイルです。 このバイナリを使用して、MCU をプログラムできます。 よろしくお願いします、 パブロ
View full article
onxruntime configuration error Dear NXP Team, We are using the FRDM-i.MX93 board. Previously, our builds compiled successfully without any issues. However, we are now encountering an onxruntime configuration error, even after testing the build process on three different machines using the same setup and versions. Below is the procedure we followed: repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap -m imx-6.6.36-2.1.0.xml   repo sync   cd sources git clone https://github.com/nxp-imx-support/meta-imx-frdm.git   cd meta-imx-frdm/ git checkout imx-frdm-1.0 MACHINE=imx93frdm   DISTRO=fsl-imx-wayland source sources/meta-imx-frdm/tools/imx-frdm-setup.sh -b frdm-imx93   bitbake imx-image-full   Despite following the same steps as before, the build fails at the onnxruntime configuration stage. We have also attached the relevant log files for your reference. Looking forward to your assistance in resolving this issue. Best regards, Aman Sharma
View full article
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 こんにちは、 回路図の接続を共有していただけますか? よろしくお願いいたします。
View full article
PF5020 详细位字段说明 数据表中没有 亲爱的恩智浦社区 我目前在嵌入式系统设计中使用PF5020和PF8100PMIC。虽然我查看了这两款设备的最新数据表,但我发现它们缺乏对每个寄存器的位域和特定功能的详细描述。 例如,虽然数据表提到了寄存器地址和高级函数(例如 SW1_RUN_MODE、OTP_FSS_EN),但它们并未解释每个位的含义、如何安全地修改它们,或者 RESET 或 OTP 加载后的默认值是什么。 我还审查了相关文件,包括 PF5020、PF8100 数据表 尽管如此,我仍然缺少带有详细位级描述的完整寄存器映射,也找不到与通常适用于MCU或SoC的寄存器参考手册类似。 请就以下方面提供建议: 是否有包含 PF5020 和 PF8100 完整位域细分的寄存器参考指南或内部文档 是否有任何其他技术资源或应用笔记可以更深入地解释寄存器功能和 OTP 设置? 感谢您的支持。 致以最诚挚的问候, Shivani Re: PF5020 Detailed Bit-Field Descriptions Not in Datasheet 您好@Shivani_Elavena, 很好的问题。不幸的是,恩智浦尚未发布包含 PF5020 和 PF8100 PMIC 位级细分的完整参考指南。数据表中包含一些 OTP 位说明,但详细的内部文档并未公开。您可能需要直接联系恩智浦支持部门,以获取更深入的见解或应用笔记。 致以最崇高的敬意, James Cross Re: PF5020 Detailed Bit-Field Descriptions Not in Datasheet 亲爱的埃拉维纳先生 遗憾的是,目前还没有其他文件提供详细的 OTP 寄存器位说明,您可以从我们的 SBC 数据表(如 FS26)中了解到,对此深表歉意。 不过,您实际上可以在数据表中找到 OTP 位的说明。 OTP_FSS_EN 位: SW1_RUN_MODE: BRs, Tomas
View full article
IPC between A55 and M7 Cores of iMX95 I am trying to get A55 and M7 Core communicating using Zephyr RTOS. I am currently using iMX95LPDDR5-EVK. A core is currently running Linux kernel whose image was generated using yocto.
View full article
LPC55SxxとPRINCE: フラッシュをチャンクで書き込み、ROM API経由でフラッシュを読み取る ハイ LPC55Sxx シリーズの PRINCE 機能に関していくつか質問があります。 1.マニュアルには、暗号化されたメモリすべてを一度に書き込む必要があると記載されています。しかし、ファームウェアのアップグレードを行う場合、ファームウェア全体をまず RAM に配置してからフラッシュにコピーする必要があるため、これは不可能ですよね?暗号化を使用するとページごとに消去したり書き込んだりすることはできないのでしょうか? 2. ROM API を使用する場合、暗号化されたメモリの読み取りは機能しないようです。FLASH_Read() 関数はゴミを返しますが、単純な memcpy() を実行すると正しく復号化されたデータが取得されます... Re: LPC55Sxx with PRINCE: write flash in chunks, and flash reading via ROM API こんにちは@keepcoding 以下のThreadをご覧ください。 https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPC55-Avoid-Crypto-Enabling-Discontinuous-PRINCE-Sub-Region/ta-p/1126449 UM11126(49.16.1 機能詳細)によれば、各暗号領域には独自の SKEY と IV コードがあります。SKEY と IV は、暗号領域のサブ領域内のデータを暗号化または復号化するときに、PRINCE によって一緒に使用されます。 たとえば、PRINCE リージョン 1 の場合、消去操作を実行するたびに新しい Skey1 と IV1 が生成されるため、別のサブリージョンに対して消去/読み取り/書き込み操作を実行すると、古い IV1 と新しい IV1 が一致せず、PRINCE が正しく復号化できません。 BR アリス Re: LPC55Sxx with PRINCE: write flash in chunks, and flash reading via ROM API 通常の消去および書き込み機能を使用して暗号化された領域を埋める(データをチャンクごとに書き込む)簡単なテストを実行しました。これは問題なく動作しているようです。 SO、私は疑問に思います。なぜドキュメントには一度に書き込む必要があると記載されているのでしょうか?何か見ていないのでしょうか?これについてもう少し詳しく説明していただけますか? Re: LPC55Sxx with PRINCE: write flash in chunks, and flash reading via ROM API こんにちは@keepcoding ご返信ありがとうございます。 当社の SDK デモも確認しましたが、確かにこれが制限事項です。 暗号化されたサブ領域全体が一度に書き込まれることを確認します。そうでない場合はエラーを返します。 BR アリス Re: LPC55Sxx with PRINCE: write flash in chunks, and flash reading via ROM API わかりました。しかし、すべてのデータを一度に書き込むにはどうすればよいですか?書き込みたいデータの量はチップ上の使用可能な SRAM よりも大きいSO、「一度にフラッシュに書き込む」前にデータをどこに配置すればよいですか? Re: LPC55Sxx with PRINCE: write flash in chunks, and flash reading via ROM API こんにちは@keepcoding 暗号化の整合性を確保するには、すべてのデータを一度に書き込みます。 FLASH_Read() は、PRINCE ハードウェア デコードを経由せずに物理的なフラッシュ データを直接読み取り、暗号化された「ガベージ」データを返します。memcpy() は CPU を介してメモリを直接読み取り、ハードウェア デコード メカニズムをトリガーする場合があります。 BR アリス
View full article
Design Studio での Clang コンパイラの使用 こんにちは、 セーフティクリティカルなアプリケーションでは、認定された Arm Clang コンパイラを使用したいと考えています。Design Studio でこれを使用する場合、注意すべき問題はありますか? 別のコンパイラを使用するための統合ガイドを教えていただけますか? ありがとうございました。 ケニー Re: Use of Clang Compiler with Design Studio ありがとう、ルーカス。そのHOWTOを見てみましょう。 Re: Use of Clang Compiler with Design Studio こんにちは@greenwichmeanie Clang コンパイラは公式にはサポートされていないため、このコンパイラの使用経験はありません。Eclipse プラグインが存在するはずなので、GHS コンパイラーのこの HOWTO ドキュメントに従ってみてください。同様の内容になるはずです。 https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Install-GHS-Compiler-Plugin/ta-p/1436232 よろしくお願いいたします。 ルーカス
View full article
disconnection issue in BLW KW45 Hi Team, we are using eatt peripheral in which I closed eatt in the code and sending data to windows application but after around 30 sec device getting disconnected. if eatt is on then  windows application will not  receive data so  I updated the code by closing eatt, during the 30sec connection data is send by peripheral and received by UI app  but automatically disconnected after 30sec. so connection will be there only till 30 seconds, so please check once is there any parameters effecting disconnection or what. Looking for immediate response! thank you! Communication & Control(I3C | I2C | SPI | FlexCAN | Ethernet | FlexIO) Development Board Re: disconnection issue in BLW KW45 issue resolved, thank you Re: disconnection issue in BLW KW45 Hello, hope you are doing well, gFastConnAdvTime_c generates a 30seg timeout for advertising, this is declared in eatt_peripheral.h parameters. For complementary information about Enhanced ATT Connections in BLE for KW45 please refer to Bluetooth Low Energy Application Developer’s Guide Chapter 4.13 Best Regards Luis
View full article
S32K1xx LIN 堆栈 LDF 分析器 队员们好 客户使用带有 LIN 栈(LIN 2.0 协议)的恩智浦 S32K118 EVB,在加载新的 LDF(LIN 描述文件)时遇到终端错误。同样的 LDF 在 CANoe 中运行正常,但在 NXP Design Studio 中却不行。   Error: "Issue:%error Error: xxxxx.ldf line: 111"NodeName" Frame sporadic_frame_name- Missing frame in LDF Configurable frames in Node Attributes. Level:错误 类型:工具问题 工具:外围设备 起源:外设 资源:Sources Information:%error Error: xxxxx.ldf line: 111"NodeName" Frame sporadic_frame_name- Missing frame in LDF Configurable frames in Node Attributes." 出现在 零星帧 中,这些零星帧封装了 无条件帧。 当 零星帧名称 被手动添加到 configurable_frames 列表时,错误消失 - 这是意料之外的行为。 这是 Design Studio 的问题、恩智浦 LIN 栈的限制还是 LDF 文件的问题? 为什么工具要求在 configurable_frames 中使用零星帧,而这并不是 LIN 2.0 的标准配置? 谢谢! BR,丹尼尔 LIN_STACK Re: S32K1xx LIN Stack LDF parser 你好,我是@danielmartynek、 能否共享客户使用的 LDF 文件? 从 LIN 规范中我读到了以下内容,我的理解是,所有帧都应列在可配置帧中,即使是零星帧也不例外。 BR 利维乌
View full article