Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
FRDM-MCXN947ボードでのSCTIMER割り込みの使用 NXPコミュニティの皆様 現在、搭載 SCTIMER ペリフェラルを使用したプログラムを開発しています。SCTIMER を使用して状態実装の 3 番目の状態で CTIMER0 ペリフェラルを起動し、PWM 信号を生成するように試みています。この PWM 信号は GPIO ピンにルーティングされます。これを実現するには、3 番目の状態に割り込みを実装して、その状態で CTIMER0 を具体的に開始する必要があります。しかし、私はあまり経験がないので、このような割り込みのプログラミングには苦労します。助けてくれませんか? 現在作業中のコードは以下の通りです。 void SCT0_IRQHandler ( void ) { SCTIMER_EventHandleIRQ(SCT0_PERIPHERAL); // SCTIMERが状態2に達したときのみCTIMERを開始する CTIMER_StartTimer(CTIMER0_PERIPHERAL); PRINTF( "CTIMER は SCTIMER 状態 2 イベント情報から開始されました。\r\n" ); } 静的void SCT0_init ( void ) { CTIMER0_init(); SCTIMER_Init(SCT0_PERIPHERAL、&SCT0_initConfig); /* NVICで割り込みSCT0_IRQN要求を有効にする */ /* 状態0の初期化 */ SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[0]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[0]); SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[2]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[2]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent 、0、 kSCTIMER_Out_0 、 kSCTIMER_Counter_U 、&SCT0_event[0]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL、1、SCT0_イベント[0]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状態1の初期化 */ /* PWMの周期イベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0]); /* PWMのパルスイベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[1]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[1]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent 、0、 kSCTIMER_Out_0 、 kSCTIMER_Counter_U 、&SCT0_event[1]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL、2、SCT0_イベント[1]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状態2の初期化 */ /* PWMの周期イベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0]); /* PWMのパルスイベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[3]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[3]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent 、0、 kSCTIMER_Out_0 、 kSCTIMER_Counter_U 、&SCT0_event_startCTimer); SCTIMER_SetCallback(SCT0_PERIPHERAL、SCT0_IRQHandler、SCT0_event_startCTimer); IRQを有効にする( SCT0_IRQn ); } 下の図は開始時の波形を示しています。目標は、黄色の PWM 信号の 4 番目の立ち上がりエッジで青色の PWM 信号を開始することです。 クロック|タイマー 開発ボード MCX N Re: SCTIMER Interupt Usage on FRDM-MCXN947 board こんにちは@Kevin_Pang 、 あなたが経験している問題は次のThreadで議論されているようです。ZhangJennie が提供した提案に従って、問題の解決に役立つかどうかを確認することをお勧めします。 BR ハビブ Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 親愛なるハビブ様 基本的な SDK の例を実行しようとしましたが、同じエラーが発生します。 敬具、 ケビン Re: SCTIMER Interupt Usage on FRDM-MCXN947 board こんにちは@Kevin_Pang 、 「hello_world」などの SDKs サンプルの 1 つを実行して、例外がコードによって発生したのか、ボード固有のものなのかを判断していただけますか? BR ハビブ Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 親愛なるハビブ様 お問い合わせいただきありがとうございます。 現在、開発ボードに問題が発生しています。その結果、プロジェクトをデバッグしようとすると、「プローブが開いていません」というエラーとともに「プローブ インデックス 1 を開けません」という例外が発生します。その後、コアとの接続に失敗します。これは、私の設定に何の変更もないのに突然起こりました。この問題の解決を手伝ってもらえますか? 敬具、 ケビン・パン Re: SCTIMER Interupt Usage on FRDM-MCXN947 board こんにちは@Kevin_Pang 、 問題が解決してよかったです。何かお手伝いできることがございましたら、お知らせください。 BR ハビブ Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 問題解決: 割り込みを正しくプログラムするための解決策はすでに見つけました。コードの実装を以下に示します (CTIMER init は示されていません)。 void SCT0_IRQHandler ( void ) { SCTIMER_EventHandleIRQ(SCT0_PERIPHERAL); } void Start_CTIMER ( void ) { // SCTIMERが状態2に達したときのみCTIMERを開始する CTIMER_StartTimer(CTIMER0_PERIPHERAL); PRINTF( "CTIMER は SCTIMER 状態 2 イベント情報から開始されました。\r\n" ); } const sctimer_config_t SCT0_initConfig = { .enableCounterUnify = true、 .clockMode = kSCTIMER_System_ClockMode 、 .clockSelect = kSCTIMER_Clock_On_Rise_Input_0 、 .enableBidirection_l = false、 .enableBidirection_h = false、 .prescale_l = 0U、 .prescale_h = 0U、 .outInitState = 0U、 .inputsync = 0U }; const sctimer_pwm_signal_param_t SCT0_pwmSignalsConfig[4] = { { .出力 = kSCTIMER_Out_0 、 .level = kSCTIMER_HighTrue 、 .dutyCyclePercent = 50U }, { .出力 = kSCTIMER_Out_1 、 .level = kSCTIMER_HighTrue 、 .dutyCyclePercent = 100U }, { .出力 = kSCTIMER_Out_1 、 .level = kSCTIMER_HighTrue 、 .dutyCyclePercent = 0U }, { .出力 = kSCTIMER_Out_1 、 .level = kSCTIMER_HighTrue 、 .dutyCyclePercent = 0U } }; uint32_t SCT0_pwmイベント[4]; uint32_t SCT0_イベント[4]; uint32_t SCT0_event_startCTimer; 静的void SCT0_init ( void ) { SCTIMER_Init(SCT0_PERIPHERAL、&SCT0_initConfig); /* NVICで割り込みSCT0_IRQN要求を有効にする */ /* 状態0の初期化 */ SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[0]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[0]); SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[2]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[2]); SCTIMER_CreateAndScheduleEvent (SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent 、0、 kSCTIMER_Out_0 、 kSCTIMER_Counter_U 、&SCT0_event[0]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL、1、SCT0_イベント[0]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状態1の初期化 */ /* PWMの周期イベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0]); /* PWMのパルスイベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[1]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[1]); SCTIMER_CreateAndScheduleEvent (SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent 、0、 kSCTIMER_Out_0 、 kSCTIMER_Counter_U 、&SCT0_event[1]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL、2、SCT0_イベント[1]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状態2の初期化 */ /* PWMの周期イベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0]); /* PWMのパルスイベント情報をスケジュールする */ SCTIMER_スケジュールイベント(SCT0、SCT0_pwmイベント[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL、&SCT0_pwmSignalsConfig[3]、 kSCTIMER_EdgeAlignedPwm 、100U、SCT0_CLOCK_FREQ、&SCT0_pwmEvent[3]); SCTIMER_CreateAndScheduleEvent (SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent 、0、 kSCTIMER_Out_0 、 kSCTIMER_Counter_U 、&SCT0_event_startCTimer); SCTIMER_SetCallback(SCT0_PERIPHERAL、Start_CTIMER、SCT0_event_startCTimer); SCTIMER_EnableInterrupts(SCT0、(1U << SCT0_event_startCTimer)); IRQを有効にする( SCT0_IRQn ); }  
View full article
NHS3152 Passive Measurement Hi everyone I have an NHS3152 on a custom PCB. The PCB is very simple, with an SWD connector for my MCU-Link Pro and some traces to a connector to attach to a screen-printed antenna. For power stability, there are 2x 100nF capacitors in parallel for both pin 3 & pin 7 (4 capacitors total). I am having an issue regarding the resistive measurements. I have two channels for resistive measurements (channel0 = pins 0,1; channel1 = pins 4,5;). When I perform a resistive measurement when the board is running passively (no power from the debugger), my NFC scanner (Adafruit PN532 shield for Arduino Uno) does not receive any data. However, it does receive the correct data from the measurements when the NHS3152 is receiving power from my debugger. If I disable the sections of the code relating to taking resistive measurements, I can successfully read the NFC contents, so I suspect the ADC is consuming too much power? Any help on this is greatly appreciated. IDE: MCUXpresso v24.9.25 SDK: release_mra2_12_6_nhs3152 Output from scanner on unsuccessful read (running in passive mode): ================================================= Tag Found and Activated! Preparing to read data. UID Length: 7 bytes UID Value: 0x04 0x8E 0xE6 0x00 0xA8 0x00 0x10 ---------------------------------------- Reading data from pages 8-12 Failed to read page 8 ================================================= Tag lost or communication failed. Resetting... ================================================= Output from scanner when NHS3152 is powered via debugger: ================================================= Tag Found and Activated! Preparing to read data. UID Length: 7 bytes UID Value: 0x04 0x8E 0xE6 0x00 0xA8 0x00 0x10 ---------------------------------------- Reading data from pages 8-12 Page 08: 6E 52 31 3A nR1: Page 09: 34 2C 52 32 4,R2 Page 10: 3A 2D 31 FE :-1 Page 11: 86 56 4D 3D VM= Page 12: 84 28 57 0C (W. Data read successfully. Tag is still present. ---------------------------------------- NHS3152  main.c: /* * James Harold, 2025, Scion * * This program measures resistance on two separate analog channels * and writes the results to an NFC tag for wireless reading. * */ // 1. Library Imports #include "board.h" #include "ndeft2t/ndeft2t.h" #include #include "pmu_nss.h" #include "gpio_nss.h" #include #include #include // 2. Defines #define CHANNEL_0 0 // Capacitive & resistive channel #define CHANNEL_1 1 // Resistive channel #define NUM_CHANNELS 2 // Number of total measurement channels // 3. Global Variables // Buffers for NDEF message creation (for NFC) static uint8_t g_ndeft2tInstanceBuffer[NDEFT2T_INSTANCE_SIZE] __attribute__((aligned (4))); static uint8_t g_nfcMessageBuffer[NFC_SHARED_MEM_BYTE_SIZE] __attribute__((aligned (4))); // Array to store the results for each measurement channel volatile int32_t measuredResistance[NUM_CHANNELS] = {0, 0}; // 4. NFC Callbacks (Required by the library, but unused) void NDEFT2T_FieldStatus_Cb(bool status) { (void)status; } void NDEFT2T_MsgAvailable_Cb(void) { /* Unused */ } // 5. Function Prototypes void SetupPowerStabilisation(void); void SetupResistiveMeasurement(int channel); int32_t PerformAndCalculateResistance(int channel); void WriteMeasurementsToNFC(int32_t res1, int32_t res2); void WriteHelloMessageToNFC(void); // 6. Main Code int main(void) { // Step 1: Perform minimal board and power setup Board_Init(); SetupPowerStabilisation(); // Must be performed early for energy harvesting from NFC tag // --- Enable Clocks and Power for peripherals that will be used --- Chip_Clock_Peripheral_EnableClock(CLOCK_PERIPHERAL_ADCDAC | CLOCK_PERIPHERAL_I2D); Chip_SysCon_Peripheral_EnablePower(SYSCON_PERIPHERAL_POWER_ADCDAC | SYSCON_PERIPHERAL_POWER_I2D); // A small delay for power and clocks to stabilise Chip_Clock_System_BusyWait_us(100); // --- Resistance Measurement Initialisation --- // Initialise the peripherals and configure the analog pins Chip_ADCDAC_Init(NSS_ADCDAC0); Chip_I2D_Init(NSS_I2D); // Configure analog pins for Channel 0 (ANA0_0, ANA0_1) Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_ANA0_0, IOCON_FUNC_1); Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_ANA0_1, IOCON_FUNC_1); // Configure analog pins for Channel 1 (ANA0_4, ANA0_5) Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_ANA0_4, IOCON_FUNC_1); Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_ANA0_5, IOCON_FUNC_1); // Set the ADC to a narrow voltage range (1.0V) Chip_ADCDAC_SetInputRangeADC(NSS_ADCDAC0, ADCDAC_INPUTRANGE_NARROW); // Step 2: Initialise NFC communication Chip_NFC_Init(NSS_NFC); NDEFT2T_Init(); // Step 3: Perform resistive measurements SetupResistiveMeasurement(CHANNEL_0); measuredResistance[CHANNEL_0] = PerformAndCalculateResistance(CHANNEL_0); SetupResistiveMeasurement(CHANNEL_1); measuredResistance[CHANNEL_1] = PerformAndCalculateResistance(CHANNEL_1); // Step 4: Write measurements to the NFC tag WriteMeasurementsToNFC(measuredResistance[CHANNEL_0], measuredResistance[CHANNEL_1]); //WriteHelloMessageToNFC(); // --- Power down peripherals after use to save energy --- Chip_SysCon_Peripheral_DisablePower(SYSCON_PERIPHERAL_POWER_ADCDAC | SYSCON_PERIPHERAL_POWER_I2D); Chip_Clock_Peripheral_DisableClock(CLOCK_PERIPHERAL_ADCDAC | CLOCK_PERIPHERAL_I2D); // Step 5: Wait for NFC peripheral interrupt while(1) { __WFI(); } return 0; // Should never be reached } // 7. Function Declarations /** * @brief Configures hardware for a resistive measurement on a specific channel. * @param channel : The measurement channel to set up (CHANNEL_0 or CHANNEL_1) * @return Nothing */ void SetupResistiveMeasurement(int channel) { ADCDAC_IO_T dac_pin; I2D_INPUT_T i2d_pin; if (channel == CHANNEL_1) { dac_pin = ADCDAC_IO_ANA0_4; i2d_pin = I2D_INPUT_ANA0_5; } else { dac_pin = ADCDAC_IO_ANA0_0; i2d_pin = I2D_INPUT_ANA0_1; } Chip_ADCDAC_SetMuxDAC(NSS_ADCDAC0, dac_pin); Chip_ADCDAC_WriteOutputDAC(NSS_ADCDAC0, 0xFFF); // Changed from 0xFFF to 0x800 to lower DAC output voltage Chip_I2D_SetMuxInput(NSS_I2D, i2d_pin); if (channel == CHANNEL_0) { Chip_I2D_Setup(NSS_I2D, I2D_SINGLE_SHOT, I2D_SCALER_GAIN_100_1, I2D_CONVERTER_GAIN_LOW, 10); // Changed I2D conversion period from 100 to 10 (power save) } else { Chip_I2D_Setup(NSS_I2D, I2D_SINGLE_SHOT, I2D_SCALER_GAIN_100_1, I2D_CONVERTER_GAIN_LOW, 10); // Changed I2D conversion period from 100 to 10 (power save) } // Wait a moment for the voltage and current to stabilise. Chip_Clock_System_BusyWait_ms(1); } /** * @brief Initialises GPIOs to enable the capacitor bank for power stability. * @return Nothing * @note This is the most critical initialisation for passive operation. */ void SetupPowerStabilisation(void) { Chip_IOCON_Init(NSS_IOCON); Chip_GPIO_Init(NSS_GPIO); // --- Phase 1: PRECHARGE --- // Configure pins as INPUTS with internal pull-up resistors enabled. // This allows the external caps to charge slowly without causing a voltage drop. Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_3, IOCON_FUNC_0 | IOCON_RMODE_PULLUP); // Configure pin 3 as GPIO and enable pull-up Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0, 3); // Configure pin 3 as input Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7, IOCON_FUNC_0 | IOCON_RMODE_PULLUP); // Configure pin 7 as GPIO and enable pull-up Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0, 7); // Configure pin 7 as input // Wait for a short time to allow the capacitors to charge. Chip_Clock_System_BusyWait_ms(60); // Approx. 60ms for 4 time constants (each pin has 200nF attached) // --- Phase 2: ENGAGE --- // Now that the caps are charged, we can safely connect them to the power rail // by setting the pins to OUTPUT and driving them HIGH. Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_3, IOCON_FUNC_0 | IOCON_RMODE_INACT); // Configure pin 3 as GPIO and disable pull-up Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 3); // Configure pin 3 as output Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 3); // Connect pin 3 to VDD rail by setting it high Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7, IOCON_FUNC_0 | IOCON_RMODE_INACT); // Configure pin 7 as GPIO and disable pull-up Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 7); // Configure pin 7 as output Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 7); // Connect pin 7 to VDD rail by setting it high } /** * @brief Creates an NDEF message with the two resistance values and writes it to memory. * @param res1 : The raw resistance value from the first channel. * @param res2 : The raw resistance value from the second channel. * @return Nothing */ void WriteMeasurementsToNFC(int32_t res1, int32_t res2) { char payloadText[64]; NDEFT2T_CREATE_RECORD_INFO_T createRecordInfo; uint8_t locale[] = "en"; snprintf(payloadText, sizeof(payloadText), "R1:%ld,R2:%ld", res1, res2); NDEFT2T_CreateMessage(g_ndeft2tInstanceBuffer, g_nfcMessageBuffer, NFC_SHARED_MEM_BYTE_SIZE, true); createRecordInfo.shortRecord = 1; createRecordInfo.pString = locale; if (NDEFT2T_CreateTextRecord(g_ndeft2tInstanceBuffer, &createRecordInfo)) { if (NDEFT2T_WriteRecordPayload(g_ndeft2tInstanceBuffer, (uint8_t*)payloadText, strlen(payloadText))) { NDEFT2T_CommitRecord(g_ndeft2tInstanceBuffer); } } NDEFT2T_CommitMessage(g_ndeft2tInstanceBuffer); } /** * @brief Creates a simple NDEF text message "hello" and writes it to NFC memory. * @return Nothing */ void WriteHelloMessageToNFC(void) { char payloadText[] = "bananas"; NDEFT2T_CREATE_RECORD_INFO_T createRecordInfo; uint8_t locale[] = "en"; // 1. Start creating a new NDEF message in our buffer. NDEFT2T_CreateMessage(g_ndeft2tInstanceBuffer, g_nfcMessageBuffer, NFC_SHARED_MEM_BYTE_SIZE, true /* isFirstMessage */); // 2. Prepare information for a new NDEF Text Record. createRecordInfo.shortRecord = 1; createRecordInfo.pString = locale; // 3. Create the Text Record structure within the message. if (NDEFT2T_CreateTextRecord(g_ndeft2tInstanceBuffer, &createRecordInfo)) { // 4. Write the actual "hello" string into the record's payload. if (NDEFT2T_WriteRecordPayload(g_ndeft2tInstanceBuffer, (uint8_t*)payloadText, strlen(payloadText))) { // 5. Finalise this specific record. NDEFT2T_CommitRecord(g_ndeft2tInstanceBuffer); } } // 6. Finalize the entire message, making it available to the NFC hardware. NDEFT2T_CommitMessage(g_ndeft2tInstanceBuffer); } /** * @brief Performs ADC and I2D conversions and calculates the resistance for a specific channel. * @param channel : The measurement channel to measure (CHANNEL_0 or CHANNEL_1) * @return A raw, scaled resistance value, or -1 if an error occurs (e.g., open circuit). * @note Uses low-power __WFE() to wait for conversions, essential for passive mode. */ int32_t PerformAndCalculateResistance(int channel) { int32_t v_drive, v_sense, i2d_val, adc_diff, resistance_result; ADCDAC_IO_T drive_pin_adc, sense_pin_adc; /* * NOTE: Peripheral clocks and power are assumed to be enabled in main(). * If this function were called from multiple places, you might enable/disable * them here instead. For this application, enabling in main() is more efficient. */ if (channel == CHANNEL_1) { drive_pin_adc = ADCDAC_IO_ANA0_4; sense_pin_adc = ADCDAC_IO_ANA0_5; } else { drive_pin_adc = ADCDAC_IO_ANA0_0; sense_pin_adc = ADCDAC_IO_ANA0_1; } // --- V_DRIVE ADC Measurement --- Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0, drive_pin_adc); Chip_ADCDAC_StartADC(NSS_ADCDAC0); // NEW, LOW-POWER WAY: Sleep until the ADC conversion is done. while (!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0) & ADCDAC_STATUS_ADC_DONE)) { { /* wait */ } } v_drive = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0); // --- V_SENSE ADC Measurement --- Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0, sense_pin_adc); Chip_ADCDAC_StartADC(NSS_ADCDAC0); // Sleep until the ADC conversion is done. while (!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0) & ADCDAC_STATUS_ADC_DONE)) { { /* wait */ } } v_sense = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0); // --- I2D Measurement --- Chip_I2D_Start(NSS_I2D); // Sleep until the I2D conversion is done. while (!(Chip_I2D_ReadStatus(NSS_I2D) & I2D_STATUS_CONVERSION_DONE)) { { /* wait */ } // Wait For Event - wakes up on ADC_DONE event --> Replaced __WFE() with busy waits {} } i2d_val = Chip_I2D_GetValue(NSS_I2D); /* * NOTE: Peripherals are left powered on for the next measurement. * They will be powered down at the end of main(). */ // --- Calculation --- adc_diff = v_drive - v_sense; if (adc_diff < 1) { adc_diff = 1; } if (i2d_val > 0) { resistance_result = ((uint32_t)adc_diff * 10000) / i2d_val; } else { resistance_result = -1; // Indicates open circuit or error } return resistance_result; } ntag2xx_read.ino: /**************************************************************************/ /*!     @file     readntag_continuous_power_and_data.ino     @author   KTOWN (Adafruit Industries) / Modified for continuous power and data read     @license  BSD (see license.txt)     This version keeps a passive NFC tag continuously powered, and on each     loop, it reads and displays the data from a specific range of pages (8-13).     It resets when the tag is removed. */ /**************************************************************************/ #include #include #include // If using the breakout with SPI, define the pins for SPI communication. #define PN532_SCK  (SCK) #define PN532_MISO (MISO) #define PN532_MOSI (MOSI) #define PN532_SS   (10) // Or whatever SPI CS pin you're using // If using the breakout or shield with I2C, define the pins for I2C // and comment out the SPI definitions. #define PN532_IRQ   (2) #define PN532_RESET (3) // Use this line for I2C Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET); // Or use this line for SPI // Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS); // Global state variables to track if a tag is currently selected bool tagIsPresent = false; uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; uint8_t uidLength; int pageStart = 8; int pageEnd = 12; void setup(void) {   Serial.begin(115200);   while (!Serial) delay(10); // For Leonardo/Micro/Zero   nfc.begin();   uint32_t versiondata = nfc.getFirmwareVersion();   if (!versiondata) {     Serial.print("Didn't find PN53x board");     while (1); // halt   }   Serial.print("Found chip PN5"); Serial.print((versiondata >> 24) & 0xFF, HEX);   Serial.print(", Firmware ver. "); Serial.print((versiondata >> 16) & 0xFF, DEC);   Serial.print('.'); Serial.println((versiondata >> 8) & 0xFF, DEC);   // Configure the board to listen for ISO14443A cards   nfc.SAMConfig();   Serial.println("Waiting for an ISO14443A Card to power and read..."); } void loop(void) {   // === STATE 1: NO TAG IS SELECTED ===   // If we don't have a tag, try to find one.   if (!tagIsPresent) {     Serial.print("."); // Print a dot to show we are waiting     // Wait for a card to enter the field. This also provides power.     bool success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength, 500);     if (success) {       tagIsPresent = true;       Serial.println("\n=================================================");       Serial.println("Tag Found and Activated! Preparing to read data.");       Serial.print("  UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");       Serial.print("  UID Value: ");       nfc.PrintHex(uid, uidLength);             // OPTIONAL DELAY: If your tag is a sensor that needs time to       // perform a measurement after power-up, add a delay here.       // 200ms is a good starting point for many sensor tags.       delay(200);     }     // If it fails or times out, the loop will just restart and try again.     return;   }   // === STATE 2: TAG IS SELECTED AND POWERED ===   // If we have a tag, attempt to read the data from pages 8 to 13.   if (tagIsPresent) {     Serial.println("----------------------------------------");     Serial.print("Reading data from pages ");     Serial.print(pageStart);     Serial.print("-");     Serial.print(pageEnd);     Serial.println();         bool all_reads_succeeded = true;         for (int page = pageStart; page <= pageEnd; page++) {       uint8_t page_data[4]; // NTAG pages are 4 bytes long             // Attempt to read the current page       if (nfc.ntag2xx_ReadPage(page, page_data)) {         // Success! Print the data.         Serial.print("  Page ");         if (page < 10) Serial.print("0"); // for nice alignment         Serial.print(page);         Serial.print(": ");         // nfc.PrintHexChar is a great helper function that prints hex and ASCII         nfc.PrintHexChar(page_data, 4);       } else {         // FAILED TO READ! This is our signal that the tag has been removed.         Serial.print("  Failed to read page "); Serial.println(page);         all_reads_succeeded = false;         break; // Exit the for loop immediately       }     }     if (all_reads_succeeded) {       Serial.println("Data read successfully. Tag is still present.");     } else {       // If any read failed, we reset the system state.       Serial.println("\n=================================================");       Serial.println("Tag lost or communication failed. Resetting...");       Serial.println("=================================================");       tagIsPresent = false; // Reset the state       nfc.SAMConfig(); // Re-configure the reader to listen for a new tag     }         // Wait a bit before the next read cycle.     delay(2000);   } } Re: NHS3152 Passive Measurement FYI. NHS3152 power only from NFC field and load Capacitor - NXP Community Re: NHS3152 Passive Measurement Hi Jimmy, thank you for replying. Do you think adding more capacitance to the capacitor bank could possibly enable ADC operation in passive mode? If so, what would be a safe amount of total capacitance to have to perform these operations. Re: NHS3152 Passive Measurement when the board running passively, the power may not stable enough for the ADC operation.
View full article
S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on the data in the ram is totally same with the code in pflash Re: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on Hi, have you solved this issue? I have the same behaviour, any suggestions? Thanks a lot! 回复: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on Hi @qimao-marvin, Can you specify the RTD revision and the S32K3xx part number? Or can you share the whole project? Thank you, BR, Daniel 回复: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on Because the address i try to erase and prohran in at the bank of the functiob, the 0x400000 - 0x500000 is the one bank, but even i put the code in the ram ,it caused the hardfault too,however ,if i erase at the 0x500000,the function runs well Re: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on Hi @qimao-marvin, Can you specify the S32K3xx part number and the sector you program? Can you share the project? Regarding the hardfault, can you find more information about the fault? Follow these guidelines: https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Handling-Interrupt-DS3-5-RTD300/ta-p/1806259 https://community.nxp.com/t5/S32K-Knowledge-Base/How-To-Debug-A-Fault-Exception-On-ARM-Cortex-M-V7M-MCU-S32K3XX/ta-p/1595570 https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447 BR, Daniel
View full article
i.MX8MQ – Initial code loading without USB/UUU using Hello, We are developing a custom embedded system using the NXP i.MX8MQ processor. Due to strict space constraints in our hardware design, we cannot expose a USB port in the final product. System Summary: Processor: i.MX8MQ RAM: 4GB DDR4 Storage: External eMMC Intended OS: Yocto Linux running on Cortex-A53 No initial bootloader or software flashed yet (fully blank system) Available debug interface: JTAG (SEGGER J-Link) Our main question is: Can we use JTAG (via J-Link) to initialize DDR and load and execute code (such as U-Boot) in RAM without using USB or the internal boot ROM boot process (i.e., bypassing UUU tool)? Or is it mandatory to use the USB OTG + UUU serial downloader at least once to load initial code to the system before we can boot from eMMC? Thank you very much for your help. Re: i.MX8MQ – Initial code loading without USB/UUU using Hi, For JTAG and JLink scripts supporting Cortex-A53, may be recommended to apply to segger directly: https://forum.segger.com/index.php/Thread/4447-SOLVED-Cortex-A53-support/ NXP uses Lauterbach Trace32 as debugger tool for Cortex-A53 cores. Regards Re: i.MX8MQ – Initial code loading without USB/UUU using Hello, Thank you for the references. I have checked the SDK and toolchain patch links as well as the OpenOCD documentation you mentioned, but I could not find a clear and complete example or guide showing how to:       * Initialize DDR from JTAG on i.MX8MQ (Cortex-A53),       * Load and execute U-Boot or any custom binary directly into A53 RAM via JTAG (e.g., with SEGGER J-Link),       * Do this entirely without using the internal boot ROM mechanisms (i.e., without USB/Serial Downloader Mode). Most available documentation seems to either:      *  Target the Cortex-M4 core,      *  Assume a bootloader is already present, or      *  As in the reference you provided, demonstrate debugging U-Boot and kernel via JTAG only after they have been loaded through USB and the UUU tool, rather than performing a full bring-up from a blank device. Could you please clarify if it is officially supported to boot Cortex-A53 code via JTAG (without USB), and if so, could you provide:       * a direct application note, app guide, or example script (J-Link, Lauterbach, DS-5, or OpenOCD)       * or any steps regarding DDR training, code upload, and A53 startup via JTAG? This would be very helpful for bringing up our custom hardware which currently has no pre-flashed bootloader and no USB access. Thank you again for your support. Best regards, Re: i.MX8MQ – Initial code loading without USB/UUU using Hello, one can look on IDE - Debug, Compile and Build Tools (2) SDK_2.3_MX8MQ_Beta_Patch(REV SDK2.3_MX8MQ_Beta) (NXP provided IAR and Segger tool patch to support i.MX8MQuad device) i.MX 8M Evaluation Kit|NXP  for A53 supported  Lauterbach and ARM DS-5, for OpenOCD one can look at a53 support on Programming Guide: OpenOCD + Eclipse + Jtag debug on Uboot & Linux  Regards Re: i.MX8MQ – Initial code loading without USB/UUU using Hello, Thank you for your support. I found documentation related to loading firmware via JTAG on the M4 core, but I could not find similar documentation for the Cortex-A53 core. Could you please provide or point me to any official documentation or resources about loading and running code on the Cortex-A53 core (i.MX8MQ) using JTAG (e.g., with SEGGER J-Link)? Best regards, Re: i.MX8MQ – Initial code loading without USB/UUU using Hello, Yes you can use jtag or you can program the eMMC or SDcard separately. regards
View full article
SCTIMER Interupt Usage on FRDM-MCXN947 board Dear NXP community, Currently, I am developing a program using the on board SCTIMER peripheral. I am trying to start the CTIMER0 peripheral in the third state of my state implementation with the SCTIMER to produce a PWM signal. This PWM signal is routed to a GPIO pin. To realize this, I will need to implement an interupt in my third state to start the CTIMER0 in that state specifically. However, I have some trouble with programming such interupt as i am not very experienced. Could you help me out? The code I am currently working on is specified below: void SCT0_IRQHandler(void) { SCTIMER_EventHandleIRQ(SCT0_PERIPHERAL); // Start CTIMER only when SCTIMER reaches state 2 CTIMER_StartTimer(CTIMER0_PERIPHERAL); PRINTF("CTIMER started from SCTIMER state 2 event.\r\n"); } static void SCT0_init(void) { CTIMER0_init(); SCTIMER_Init(SCT0_PERIPHERAL, &SCT0_initConfig); /* Enable interrupt SCT0_IRQN request in the NVIC */ /* Initialization of state 0 */ SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[0], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[0]); SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[2], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[2]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U, &SCT0_event[0]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 1, SCT0_event[0]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* Initialization of state 1 */ /* Schedule the period event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* Schedule the pulse event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[1], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[1]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U, &SCT0_event[1]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 2, SCT0_event[1]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* Initialization of state 2 */ /* Schedule the period event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* Schedule the pulse event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[3], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[3]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U, &SCT0_event_startCTimer); SCTIMER_SetCallback(SCT0_PERIPHERAL, SCT0_IRQHandler, SCT0_event_startCTimer); EnableIRQ(SCT0_IRQn); } The picture below shows the wave form at the start. The goal is to start the blue PWM signal at the fourth rising edge of the yellow PWM signal. Clock|Timers Development Board MCXN Re: SCTIMER Interupt Usage on FRDM-MCXN947 board Hello @Kevin_Pang, It looks like the issue you are experiencing is discussed in the next thread. I recommend following the suggestions provided by ZhangJennie to see if they help resolve the problem. BR Habib Re: SCTIMER Interupt Usage on FRDM-MCXN947 board Dear Habib, I have tried to run a basic sdk example and I still encounter the same error.  Kind regards, Kevin  Re: SCTIMER Interupt Usage on FRDM-MCXN947 board Hello @Kevin_Pang, Could you try running one of the SDK examples, such as "hello_world," to determine whether the exception is caused by your code or is specific to your board? BR Habib Re: SCTIMER Interupt Usage on FRDM-MCXN947 board Dear Habib, Thank you for reaching out.  I now have a problem with the development board. It consequently raises an exception "Unable to open probe index 1" with the error "Probe not open" when trying to debug my project. Afterwards, it fails to connect with the core. This happened suddenly without any change in my setup. Can you help me solve this issue? Kind regards, Kevin Pang Re: SCTIMER Interupt Usage on FRDM-MCXN947 board Hello @Kevin_Pang, I am glad your issue is solved. Please let me know if there is anything that I can do for you. BR Habib Re: SCTIMER Interupt Usage on FRDM-MCXN947 board PROBLEM SOLVED: I have already found out the solution to program the interupt correctly. The code implementation is shown below (CTIMER init not shown): void SCT0_IRQHandler(void) { SCTIMER_EventHandleIRQ(SCT0_PERIPHERAL); } void Start_CTIMER(void) { // Start CTIMER only when SCTIMER reaches state 2 CTIMER_StartTimer(CTIMER0_PERIPHERAL); PRINTF("CTIMER started from SCTIMER state 2 event.\r\n"); } const sctimer_config_t SCT0_initConfig = { .enableCounterUnify = true, .clockMode = kSCTIMER_System_ClockMode, .clockSelect = kSCTIMER_Clock_On_Rise_Input_0, .enableBidirection_l = false, .enableBidirection_h = false, .prescale_l = 0U, .prescale_h = 0U, .outInitState = 0U, .inputsync = 0U }; const sctimer_pwm_signal_param_t SCT0_pwmSignalsConfig[4] = { { .output = kSCTIMER_Out_0, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 50U }, { .output = kSCTIMER_Out_1, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 100U }, { .output = kSCTIMER_Out_1, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 0U }, { .output = kSCTIMER_Out_1, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 0U } }; uint32_t SCT0_pwmEvent[4]; uint32_t SCT0_event[4]; uint32_t SCT0_event_startCTimer; static void SCT0_init(void) { SCTIMER_Init(SCT0_PERIPHERAL, &SCT0_initConfig); /* Enable interrupt SCT0_IRQN request in the NVIC */ /* Initialization of state 0 */ SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[0], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[0]); SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[2], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[2]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U, &SCT0_event[0]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 1, SCT0_event[0]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* Initialization of state 1 */ /* Schedule the period event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* Schedule the pulse event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[1], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[1]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U, &SCT0_event[1]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 2, SCT0_event[1]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* Initialization of state 2 */ /* Schedule the period event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* Schedule the pulse event for the PWM */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL, &SCT0_pwmSignalsConfig[3], kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ, &SCT0_pwmEvent[3]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U, &SCT0_event_startCTimer); SCTIMER_SetCallback(SCT0_PERIPHERAL, Start_CTIMER, SCT0_event_startCTimer); SCTIMER_EnableInterrupts(SCT0, (1U << SCT0_event_startCTimer)); EnableIRQ(SCT0_IRQn); }  
View full article
NHS3152 パッシブ測定 やあみんな カスタム PCB 上に NHS3152 が搭載されています。PCB は非常にシンプルで、MCU-Link Pro 用の SWD コネクタと、スクリーン印刷されたアンテナに接続するためのコネクタへのトレースがいくつか付いています。電力の安定性を確保するため、ピン 3 とピン 7 の両方に 2 つの 100nF コンデンサが並列に接続されています (合計 4 つのコンデンサ)。 抵抗測定に関して問題があります。抵抗測定用のチャネルが 2 つあります (チャネル 0 = ピン 0、1、チャネル 1 = ピン 4、5)。ボードがパッシブに実行されているとき (デバッガーから電源が供給されていないとき) に抵抗測定を実行すると、NFC スキャナー (Arduino Uno 用の Adafruit PN532 シールド) はデータを受信しません。ただし、NHS3152 がデバッガーから電力を受け取っている場合は、測定から正しいデータを受信します。 抵抗測定に関連するコードのセクションを無効にすると、NFC の内容を正常に読み取ることができるので、ADC が電力を消費しすぎているのではないかと思います。 これに関してご助力いただければ幸いです。 IDE: MCUXpresso v24.9.25 SDK: release_mra2_12_6_nhs3152 読み取り失敗時のスキャナーからの出力(パッシブ モードで実行中): ================================================= タグが見つかりアクティブ化されました!データの読み取りを準備しています。 UIDの長さ: 7バイト UID値: 0x04 0x8E 0xE6 0x00 0xA8 0x00 0x10 ---------------------------------------- 8~12ページからのデータの読み取り 8ページを読み取れませんでした ================================================= タグが失われたか、通信に失敗しました。リセットしています... ================================================= デバッガー経由でNHS3152に電源が投入されたときのスキャナーからの出力: ================================================= タグが見つかりアクティブ化されました!データの読み取りを準備しています。 UIDの長さ: 7バイト UID値: 0x04 0x8E 0xE6 0x00 0xA8 0x00 0x10 ---------------------------------------- 8~12ページからのデータの読み取り ページ08: 6E 52 31 3A nR1: ページ09: 34 2C 52 32 4,R2 ページ10: 3A 2D 31 FE :-1 ページ 11: 86 56 4D 3D VM= ページ 12: 84 28 57 0C (W. データの読み取りに成功しました。タグはまだ残っています。 ---------------------------------------- NHS3152 メイン.c: /* * ジェームズ・ハロルド、2025年、サイオン * * このプログラムは2つの別々のアナログチャネルで抵抗を測定します * 結果を NFC タグに書き込み、ワイヤレスで読み取ります。 * */ // 1. ライブラリのインポート #include "board.h" #include "ndeft2t/ndeft2t.h" #include #include "pmu_nss.h" #include "gpio_nss.h" #include #include #include // 2. 定義 #define CHANNEL_0 0 // 容量性および抵抗性チャネル #define CHANNEL_1 1 // 抵抗チャネル #define NUM_CHANNELS 2 // 測定チャネルの総数 // 3. グローバル変数 // NDEFメッセージ作成用のバッファ(NFC用) 静的uint8_t g_ndeft2tInstanceBuffer[NDEFT2T_INSTANCE_SIZE] __attribute__ ((aligned (4))); 静的uint8_t g_nfcMessageBuffer[NFC_SHARED_MEM_BYTE_SIZE] __attribute__ ((aligned (4))); // 各測定チャネルの結果を格納する配列 揮発性int32_t 測定抵抗[NUM_CHANNELS] = {0, 0}; // 4. NFCコールバック(ライブラリで必須だが未使用) void NDEFT2T_FieldStatus_Cb (bool ステータス) { ( void )ステータス; } void NDEFT2T_MsgAvailable_Cb ( void ) { /* 未使用 */ } // 5. 関数プロトタイプ voidセットアップ電力安定化( void ); voidセットアップ抵抗測定( intチャネル); int32_t PerformAndCalculateResistance ( intチャネル); void WriteMeasurementsToNFC (int32_t res1、int32_t res2); void WriteHelloMessageToNFC ( void ); // 6. メインコード int main ( void ) { // ステップ1: 最小限のボードと電源のセットアップを実行する ボード初期化(); SetupPowerStabilisation (); // NFCタグからのエネルギー収集のためには早めに実行する必要がある // --- 使用するペリフェラルのクロックと電源を有効にする --- Chip_Clock_Peripheral_EnableClock( CLOCK_PERIPHERAL_ADCDAC | CLOCK_PERIPHERAL_I2D ); Chip_SysCon_Peripheral_EnablePower( SYSCON_PERIPHERAL_POWER_ADCDAC | SYSCON_PERIPHERAL_POWER_I2D ); // 電源とクロックが安定するまでの小さな遅延 チップクロックシステムビジーウェイトus(100); // --- 抵抗測定の初期化 --- // ペリフェラルを初期化し、アナログピンを設定する Chip_ADCDAC_Init(NSS_ADCDAC0); Chip_I2D_Init(NSS_I2D); // Configure チャネル0のアナログピンを設定する(ANA0_0、ANA0_1) Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_0 、IOCON_FUNC_1); Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_1 、IOCON_FUNC_1); //チャネル1のアナログピン(ANA0_4、ANA0_5)を設定します Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_4 、IOCON_FUNC_1); Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_5 、IOCON_FUNC_1); // ADCを狭い電圧範囲(1.0V)に設定します Chip_ADCDAC_SetInputRangeADC(NSS_ADCDAC0、 ADCDAC_INPUTRANGE_NARROW ); // ステップ 2: NFC 通信を初期化する Chip_NFC_Init(NSS_NFC); NDEFT2T_Init(); // ステップ3: 抵抗測定を実行する 抵抗測定を設定します(CHANNEL_0); 測定抵抗[CHANNEL_0] = PerformAndCalculateResistance(CHANNEL_0); 抵抗測定を設定します(CHANNEL_1); 測定された抵抗[CHANNEL_1] = PerformAndCalculateResistance(CHANNEL_1); // ステップ4: 測定値をNFCタグに書き込む 測定抵抗をNFCに書き込みます(測定抵抗[CHANNEL_0]、測定抵抗[CHANNEL_1])。 //HelloMessageをNFCに書き込みます(); // --- 使用後はペリフェラルの電源を切って電力を節約する --- Chip_SysCon_Peripheral_DisablePower( SYSCON_PERIPHERAL_POWER_ADCDAC | SYSCON_PERIPHERAL_POWER_I2D ); Chip_Clock_Peripheral_DisableClock( CLOCK_PERIPHERAL_ADCDAC | CLOCK_PERIPHERAL_I2D ); // ステップ5: NFCペリフェラルの割り込みを待つ (1) { { __WFI(); } return 0; // 決して到達してはならない } // 7. 関数宣言 /** * @brief 特定のチャネルでの抵抗測定用にハードウェアを構成します。 * @param channel : 設定する測定チャネル(CHANNEL_0 または CHANNEL_1) * @return 何も返さない */ voidセットアップ抵抗測定( intチャネル) { ADCDAC_IO_T dac_pin; I2D_INPUT_T i2d_ピン; if (チャネル == CHANNEL_1) { dac_pin = ADCDAC_IO_ANA0_4 ; i2d_pin = I2D_INPUT_ANA0_5 ; } それ以外{ dac_pin = ADCDAC_IO_ANA0_0 ; i2d_pin = I2D_INPUT_ANA0_1 ; } Chip_ADCDAC_SetMuxDAC(NSS_ADCDAC0、dac_pin); Chip_ADCDAC_WriteOutputDAC(NSS_ADCDAC0, 0xFFF); // DAC出力電圧を下げるために0xFFFから0x800に変更しました Chip_I2D_SetMuxInput(NSS_I2D、i2d_pin); if (チャネル == CHANNEL_0) { Chip_I2D_Setup(NSS_I2D, I2D_SINGLE_SHOT , I2D_SCALER_GAIN_100_1 , I2D_CONVERTER_GAIN_LOW , 10); // I2D変換周期を100から10に変更(省電力) } それ以外{ Chip_I2D_Setup(NSS_I2D, I2D_SINGLE_SHOT , I2D_SCALER_GAIN_100_1 , I2D_CONVERTER_GAIN_LOW , 10); // I2D変換周期を100から10に変更(省電力) } // 電圧と電流が安定するまでしばらく待ちます。 チップクロックシステムビジーウェイトms(1); } /** * @brief 電力の安定性のためにコンデンサ バンクを有効にするために GPIO を初期化します。 * @return 何も返さない * @note これはパッシブ操作にとって最も重要な初期化です。 */ voidセットアップ電力安定化( void ) { Chip_IOCON_Init(NSS_IOCON); Chip_GPIO_Init(NSS_GPIO); // --- フェーズ 1: プリチャージ --- // 内部プルアップ抵抗を有効にしてピンを入力として設定します。 // これにより、電圧降下を引き起こすことなく、外部キャップをゆっくり充電できるようになります。 Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_3 , IOCON_FUNC_0 | IOCON_RMODE_PULLUP); // ピン3をGPIOとして設定し、プルアップを有効にする Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0, 3); // ピン3を入力として設定する Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7 , IOCON_FUNC_0 | IOCON_RMODE_PULLUP); // ピン7をGPIOとして設定し、プルアップを有効にする Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0, 7); // ピン7を入力として設定する // コンデンサが充電されるまで少し待ちます。 Chip_Clock_System_BusyWait_ms(60); // 4つの時定数で約60ms(各ピンに200nFが接続されています) // --- フェーズ2: エンゲージ --- // キャップが充電されたので、安全に電源レールに接続CAN // ピンを OUTPUT に設定し、HIGH に駆動します。 Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_3 , IOCON_FUNC_0 | IOCON_RMODE_INACT); // ピン3をGPIOとして設定し、プルアップを無効にします Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 3); // ピン3を出力として設定する Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 3); // ピン3をHighに設定してVDDレールに接続します Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7 , IOCON_FUNC_0 | IOCON_RMODE_INACT); // ピン7をGPIOとして設定し、プルアップを無効にします Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 7); // ピン7を出力として設定する Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 7); // ピン7をHighに設定してVDDレールに接続します } /** * @brief 2 つの抵抗値を含む NDEF メッセージを作成し、メモリに書き込みます。 * @ param res1: 最初のチャネルからの生の抵抗値。 * @ param res2: 2 番目のチャネルからの生の抵抗値。 * @return 何も返さない */ void WriteMeasurementsToNFC (int32_t res1, int32_t res2) { charペイロードテキスト[64]; NDEFT2T_CREATE_RECORD_INFO_Tレコード情報を作成します。 uint8_t ロケール[] = " en " ; snprintf(payloadText, sizeof (payloadText), "R1: %ld,R2:% ld " , res1, res2); NDEFT2T_CreateMessage(g_ndeft2tInstanceBuffer、g_nfcMessageBuffer、 NFC_SHARED_MEM_BYTE_SIZE、true); createRecordInfo.shortRecord = 1 ; createRecordInfo.pString = ロケール; if (NDEFT2T_CreateTextRecord(g_ndeft2tInstanceBuffer, &createRecordInfo)) { if (NDEFT2T_WriteRecordPayload(g_ndeft2tInstanceBuffer, (uint8_t*)payloadText, strlen(ペイロードテキスト))) { NDEFT2T_CommitRecord(g_ndeft2tInstanceBuffer); } } NDEFT2T_CommitMessage(g_ndeft2tInstanceBuffer); } /** * @brief シンプルな NDEF テキスト メッセージ「hello」を作成し、NFC メモリに書き込みます。 * @return 何も返さない */ void WriteHelloMessageToNFC ( void ) { char payloadText[] = "バナナ" ; NDEFT2T_CREATE_RECORD_INFO_Tレコード情報を作成します。 uint8_t ロケール[] = " en " ; // 1. バッファ内に新しい NDEF メッセージの作成を開始します。 NDEFT2T_CreateMessage(g_ndeft2tInstanceBuffer、g_nfcMessageBuffer、 NFC_SHARED_MEM_BYTE_SIZE、true /* 最初のメッセージです */ ); // 2. 新しい NDEF テキスト レコードの情報を準備します。 createRecordInfo.shortRecord = 1 ; createRecordInfo.pString = ロケール; // 3. メッセージ内にテキスト レコード構造を作成します。 if (NDEFT2T_CreateTextRecord(g_ndeft2tInstanceBuffer, &createRecordInfo)) { // 4. 実際の「hello」文字列をレコードのペイロードに書き込みます。 if (NDEFT2T_WriteRecordPayload(g_ndeft2tInstanceBuffer, (uint8_t*)payloadText, strlen(ペイロードテキスト))) { // 5. この特定のレコードを確定します。 NDEFT2T_CommitRecord(g_ndeft2tInstanceBuffer); } } // 6.メッセージ全体を確定し、NFC ハードウェアで使用できるようにします。 NDEFT2T_CommitMessage(g_ndeft2tInstanceBuffer); } /** * @brief ADC および I2D 変換を実行し、特定のチャネルの抵抗を計算します。 * @param channel : 測定する測定チャネル(CHANNEL_0 または CHANNEL_1) * @return 生のスケーリングされた抵抗値、またはエラーが発生した場合は -1 (例: オープン サーキット)。 * @note 低電力の __WFE() を使用して変換を待機します。これはパッシブ モードに不可欠です。 */ int32_t PerformAndCalculateResistance ( intチャネル) { int32_t v_drive、v_sense、i2d_val、adc_diff、result; ADCDAC_IO_Tドライブピンadc、センスピンadc; /* * 注意: ペリフェラルクロックと電源は main() で有効になっているものと想定されます。 * この関数が複数の場所から呼び出される場合は、有効/無効にすることができます * 代わりにここに記載してください。このアプリケーションでは、main() で有効にする方が効率的です。 */ if (チャネル == CHANNEL_1) { ドライブピンadc = ADCDAC_IO_ANA0_4 ; sense_pin_adc = ADCDAC_IO_ANA0_5 ; } それ以外{ ドライブピンadc = ADCDAC_IO_ANA0_0 ; sense_pin_adc = ADCDAC_IO_ANA0_1 ; } // --- V_DRIVE ADC測定 --- Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0、ドライブピンadc); Chip_ADCDAC_StartADC(NSS_ADCDAC0); // 新しい低電力の方法: ADC 変換が完了するまでスリープします。 while (!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0) & ADCDAC_STATUS_ADC_DONE )) { { /* 待って */ } } v_drive = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0); // --- V_SENSE ADC測定 --- Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0、sense_pin_adc); Chip_ADCDAC_StartADC(NSS_ADCDAC0); // ADC 変換が完了するまでスリープします。 while (!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0) & ADCDAC_STATUS_ADC_DONE )) { { /* 待って */ } } v_sense = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0); // --- I2D測定 --- Chip_I2D_Start(NSS_I2D); // I2D 変換が完了するまでスリープします。 while (!(Chip_I2D_ReadStatus(NSS_I2D) & I2D_STATUS_CONVERSION_DONE )) { { /* wait */ } // イベント情報を待機 - ADC_DONE イベント情報で起動 --> __WFE() をビジー待機に置き換えました {} } i2d_val = Chip_I2D_GetValue(NSS_I2D); /* * 注意: 次の測定ではペリフェラルの電源はオンのままになります。 * main() の終了時に電源がオフになります。 */ // --- 計算 --- adc_diff = v_drive - v_sense; (adc_diff < 1)の場合{ adc_diff = 1; } i2d_val > 0 の場合{ 抵抗結果 = ((uint32_t)adc_diff * 10000) / i2d_val; } それ以外{ resistance_result = -1; // 断線またはエラーを示します } resistance_resultを返します。 } ntag2xx_read.ino: /********************************************************************************/ /*!     @ファイルreadntag_continuous_power_and_data.ino     @author KTOWN (Adafruit Industries) / 連続電源とデータ読み取り用に改造 @license BSD (license.txt を参照) このバージョンではパッシブNFCタグに継続的に電力が供給され、 ループでは、特定の範囲のページ (8 ~ 13) からデータを読み取って表示します。 タグが削除されるとリセットされます。 */ /********************************************************************************/ #include #include #include // SPI でブレークアウトを使用する場合は、SPI 通信用のピンを定義します。 #PN532_SCK (SCK)を定義します。 #define PN532_MISO (MISO) #PN532_MOSI (MOSI)を定義します。 #define PN532_SS (10) // または使用しているSPI CSピン // I2Cでブレークアウトまたはシールドを使用する場合は、I2Cのピンを定義します // SPI 定義をコメント アウトします。 # PN532_IRQを定義する(2) #PN532_RESETを定義する(3) // この行をI2Cに使用します Adafruit_PN532 nfc (PN532_IRQ、PN532_RESET); // またはSPIの場合はこの行を使用します // Adafruit_PN532 nfc(PN532_SCK、PN532_MISO、PN532_MOSI、PN532_SS); // タグが現在選択されているかどうかを追跡するグローバル状態変数 ブールtagIsPresent = false ; uint8_t uid[] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 }; uint8_t uid長さ; intページ開始 = 8 ; intページ終了 = 12 ; voidセットアップ( void ) {   シリアル.begin ( 115200 ) ;   while (!Serial) delay ( 10 ); // Leonardo/Micro/Zeroの場合   nfc .begin ( );   uint32_t versiondata = nfc.getFirmwareVersion ( ) ;   if (!versiondata) {     シリアル.print ( "PN53xボードが見つかりませんでした" );     while ( 1 ); // 停止   }   Serial.print ( "チップPN5が見つかりました" ) ; Serial.print ( (versiondata >> 24 ) & 0x FF , HEX);   Serial.print ( ",ファームウェアバージョン " ) ; Serial.print ((versiondata >> 16 ) & 0x FF , DEC );   シリアル.print ( '.' );シリアル.println ( (versiondata >> 8 ) & 0x FF , DEC ); // ISO14443A カードをリッスンするようにボードを構成する   nfc.SAMConfig ( ) ;   シリアル.println ( "ISO14443Aカードの電源と読み取りを待機しています..." ) ; } void loop ( void ) {   // === 状態 1: タグが選択されていません === // タグがない場合は、タグを探します。   タグが存在する場合{     Serial.print ( "." ); // 待機中であることを示すドットを出力します // カードがフィールドに入るのを待ちます。これによって電力も供給されます。     bool成功 = nfc . readPassiveTargetID (PN532_MIFARE_ISO14443A, uid, &uidLength, 500 );     (成功)の場合{ tagIsPresent = true ;       シリアル.println ( " \n============================================================" );       シリアル.println ( "タグが見つかりアクティブ化されました。データの読み取りを準備しています。" ) ;       Serial.print ( "UID長さ:" ) ; Serial.print ( uidLength ,DEC); Serial.println ( "バイト" ) ;       シリアル.print ( "UID値:" ) ;       nfc . PrintHex (uid, uidLength);       // オプションの遅延: タグがセンサで、 // 電源投入後に測定を実行する場合は、ここで遅延を追加します。 // 多くのセンサ タグの場合、200 ミリ秒が適切な開始点です。       遅延( 200 );    } // 失敗またはタイムアウトした場合は、ループが再開され、再試行されます。     戻る;   }   // === 状態 2: タグが選択され、電源が投入されています === // タグがある場合は、ページ 8 から 13 までのデータを読み取ろうとします。   (タグが存在する)の場合{     シリアル.println ( "----------------------------------------" ) ;     シリアル.print ( "ページからデータを読み込んでいます" ) ;     シリアル.print (pageStart) ;     シリアル.print ( "-" ) ;     シリアル.print ( pageEnd);     シリアル.println ( );         ブール値all_reads_succeeded = true ;         for ( int page = pageStart; page <= pageEnd; page++) {       uint8_t page_data [ 4 ]; // NTAGページは4バイト長です       // 現在のページを読み取ろうとする       if ( nfc . ntag2xx_ReadPage (ページ、ページデータ)) { // 成功!データを印刷します。         シリアル.print ( "ページ" );         if (page < 10 ) Serial . print ( "0" ); // きれいに整列させる         シリアル.印刷(ページ);         シリアル.print ( ": " ) ; // nfc.PrintHexCharは16進数とASCIIコードを出力する優れたヘルパー関数です         nfc . PrintHexChar (page_data, 4 ); }それ以外{ // 読み取りに失敗しました!これはタグが削除されたことを示す信号です。         Serial.print ( "ページの読み取りに失敗しました" ) ; Serial.println ( page ); all_reads_succeeded = false ;         break ; // forループを直ちに終了する      }    }     すべての読み取りが成功した場合{       シリアル.println ( "データの読み取りに成功しました。タグはまだ存在します。" ); }それ以外{ // 読み取りに失敗した場合は、システム状態をリセットします。       シリアル.println ( " \n============================================================" );       シリアル.println ( "タグが失われたか通信に失敗しました。リセットしています..." );       シリアル.println ( "============================================================" ) ; tagIsPresent = false ; // 状態をリセットする       nfc . SAMConfig (); // 新しいタグをリッスンするようにリーダーを再設定する    }     // 次の読み取りサイクルの前に少し待機します。     遅延( 2000年);   } } Re: NHS3152 Passive Measurement ご参考までに。 NHS3152 は NFC フィールドと負荷コンデンサからのみ電力供給されます - NXP コミュニティ Re: NHS3152 Passive Measurement こんにちは、ジミーさん。返信ありがとうございます。コンデンサ バンクにさらに静電容量を追加すると、パッシブ モードでの ADC 動作が可能になると思われますか?もしそうなら、これらの操作を実行するために必要な総静電容量はどれくらいでしょうか。 Re: NHS3152 Passive Measurement ボードがパッシブに動作している場合、ADC の動作に十分な電力が安定しない可能性があります。
View full article
flash.bin FRDM IMX93 大家好, 我使用的是 FRDM iMX93。拆封后,我尝试按照https://www.nxp.com/document/guide/getting-started-with-frdm-imx93:GS-FRDM-IMX93?section=build-and-run进行操作,一切正常。 现在我想要我的自定义 u-boot、ATF、OPTEE。我使用了与 yocto 相同的哈希值并且版本得很完美。我使用 mkimage 创建 flash.bin,在此之前一切正常。 但是......当我尝试闪存这个 flash.bin(使用 Balena)时,控制台没有任何反应。 我试着从正在运行的 yocto flash 中使用闪存,bin 但是一样的,无法启动。 如何仅使用 flash.bin 创建可启动映像? 当我看到 u-boot 启动时,稍后会添加内核 rootfs。 此致, 公署 Re: flash.bin FRDM IMX93 对我来说,这就是解决办法: dd if=iMX93/flash.bin of=bootable.img bs=1K seek=32 conv=fsync 与 Balena 相比 bootable.img 正在启动。我不知道为什么会出错,但至少我看到了控制台输出: U-启动 SPL 2024.04-00003-g7e135e087e8(2025 年 7 月 19 日-19:10:15 +0000) SOC:0xa1009300 LC:0x40010 PMIC:过压模式 错误:ele_volt_change_start_req:ret -5,响应 0xf429 错误:ele_volt_change_finish_req:ret -5,响应 0xf429 DDR:3733 MTS DDR:3733MTS 发现 DRAM 2GB DRAM 匹配 M33 准备好正常启动正在尝试从 BOOTROM 启动阶段启动:主启动映像偏移量 0x8000,页面大小 0x200,ivt 偏移量 0x0 从 ROM_API 加载来自 0x40400 的图像 " PCA9451A同步中止 " 处理程序,esr 0x020000000 elr: 00000000204e0000 lr: 000000002049dafc x 0:00000000204e0000 x 1:0000000020501ba0 x 2:0000000000000fc0 x 3:0000000083200040 x 4:00000000204b6958 x 5:0000000083200450 x 6:0000000000001 x 7:00000000000001 x 7:00000000000001 x 7:0000000000001 x 7:0000000000001 x 7:0000000000001 x 7:0000000000001 x 7:0000000000000083200450 x 8:000000000000f0 x 9:00000000796d7959 x10:00000000796d7959 x11:00000000000001 x12:000000000000001 x13:0000000000000012 x14:00000000000001 x15:00000000000003 x16:0000000000204a5ef4 x17:00000000000000 x18:0000000020501c10 x19:00000000204b9af8 x20:00000000204b9ae0 x21:0000000020501bb0 x22:0000000000deadbeef x23:00000000204b9ae0 x24:0000000000000 x26:00000000204ad81c x27:00000000204ad000 x27:00000000204ad000 x28:00000000204ad804 x29:00000000 20501b30 代码:00000000 00000000 00000000 00000000 (00000004) RESET CPU... 正在RESET... Re: flash.bin FRDM IMX93 谢谢您的回复,我会试试的。如果这行得通,那就意味着 uuu 工具会插入一些可被 ROM 启动识别的标头?有关于启动顺序的详细文档吗? Re: flash.bin FRDM IMX93 你好 我建议你用 UUU 代替 Balena。 请尝试下一条命令: uuu -b flash.bin 顺祝商祺!
View full article
i.MX8MQ - 在不使用 USB/UUU 的情况下加载初始代码 你好 我们正在开发一个使用恩智浦 i.MX8MQ 处理器的定制嵌入式系统。由于硬件设计的空间限制,我们无法在最终产品中使用 USB 端口。 系统概要: 处理器:i.MX8MQ 内存: 4GB DDR4 存储空间外置 eMMC 目标操作系统在 Cortex-A53 上运行的 Yocto Linux 尚未刷新初始启动加载程序或软件(系统完全空白) 可用的调试接口:JTAG(SEGGER J-Link) 我们的主要问题是 我们能否使用 JTAG(通过 J-Link)初始化 DDR 并在不使用 USB 或内部启动 ROM 启动过程(即绕过 UUU 工具)的情况下在 RAM 中加载和执行代码(例如 U-Boot)? 还是必须至少使用一次USB OTG + UUU串行下载器将初始代码加载到系统中,然后才能从eMMC启动? 非常感谢你们的帮助。 Re: i.MX8MQ – Initial code loading without USB/UUU using 您好, 对于支持 Cortex-A53 的 JTAG 和 JLink 脚本,建议直接应用于 segger: https://forum.segger.com/index.php/Thread/4447-SOLVED-Cortex-A53-support/ 恩智浦将 Lauterbach Trace32 用作 Cortex-A53 内核的调试器工具。 此致 Re: i.MX8MQ – Initial code loading without USB/UUU using 你好 感谢您的参考。 我查看了 SDK 和工具链补丁链接以及您提到的 OpenOCD 文档,但没有找到一个清晰完整的示例或指南来说明如何操作: * 在 i.MX8MQ (Cortex-A53) 上通过 JTAG 初始化 DDR、 * 通过 JTAG(例如,使用 SEGGER J-Link)将 U-启动 或任何自定义二进制文件直接加载并执行到 A53 RAM 中, * 完全不使用内部启动 ROM 机制(即不使用 USB/串行下载器模式)即可执行此操作。 现有的大多数文献似乎都是 * 以 Cortex-M4 内核为目标、 * 假设已存在引导加载程序,或 * 与您提供的参考一样,演示只有在通过 USB 和 UUU 工具加载 U-Boot 和内核之后才能通过 JTAG 对其进行调试,而不是在空白设备上进行全面启动。 你能否澄清一下官方是否支持通过 JTAG(不带 USB)启动 Cortex-A53 代码,如果是,你能否提供: * 直接的应用笔记、应用指南或示例脚本(J-Link、Lauterbach、DS-5 或 OpenOCD) * 或有关 DDR 训练、代码上传和通过 JTAG 启动 A53 的任何步骤? 这对调用我们的定制硬件非常有帮助,因为我们的定制硬件目前没有预刷新的启动加载程序,也没有 USB 访问权限。 再次感谢您的支持。 顺祝商祺! Re: i.MX8MQ – Initial code loading without USB/UUU using 你好 可望 IDE-调试、编译和版本工具 (2) SDK_2.3_mx8mq_beta_Patch (REV)sdk2.3_mx8mq_beta) (恩智浦提供了 IAR 和 Segger 工具补丁以支持 i.mx8MQuad 设备) i.MX 8M 评估套件|NXP 对于支持 A53 的 Lauterbach 和 ARM DS-5,对于 OpenOCD,可以看看 a53 的支持 编程指南:OpenOCD + Eclipse + Jtag 在 Uboot 上调试& Linux 此致 Re: i.MX8MQ – Initial code loading without USB/UUU using 你好 感谢您的支持。 我找到了通过 JTAG 在 M4 内核上加载固件的相关文档,但没有找到 Cortex-A53 内核的类似文档。 能否提供或向我提供有关使用 JTAG(如使用世纪佳缘 J-Link)在 Cortex-A53 内核(i.MX8MQ)上加载和运行代码的官方文档或资源? 顺祝商祺! Re: i.MX8MQ – Initial code loading without USB/UUU using 你好 是的,您可以使用 jtag 或单独对 eMMC 或 SD 卡进行编程。 此致问候
View full article
SCTIMER Interupt 在 FRDM-MCXN947 板上的用法 亲爱的恩智浦社区 目前,我正在使用板载 SCTIMER 外设开发一个程序。我正试图通过 SCTIMER 在状态实现的第三个状态下启动 CTIMER0 外设,以产生 PWM 信号。该 PWM 信号被路由至 GPIO 引脚。为了实现这一点,我需要在第三个状态下实现中断,以便在该状态下专门启动 CTIMER0。不过,由于经验不足,我在编写此类中断程序时遇到了一些麻烦。你能帮帮我吗? 我目前正在编写的代码如下: void SCT0_IRQHandler(void) { SCTIMER_EventHandleIRQ(SCT0_PERIPHERAL); // 只有当 SCTIMER 达到状态 2 时才启动 CTIMER CTIMER_StartTimer(CTIMER0_PERIPHERAL); PRINTF("CTIMER started from SCTIMER state 2 event.\r\n"); } 静态 void SCT0_init(void) { CTIMER0_init(); SCTIMER_Init(SCT0_PERIPHERAL,&SCT0_initConfig); /* 启用 NVIC 中的中断 SCT0_IRQN 请求 */ /* 状态 0 初始化 */ SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[0]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[0]); SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[2]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[2]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U,&SCT0_event[0]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 1, SCT0_event[0]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状态 1 初始化 */ /* 为 PWM 安排周期事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* 安排 PWM 的脉冲事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[1]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[1]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U,&SCT0_event[1]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 2, SCT0_event[1]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状态 2 初始化 */ /* 为 PWM 安排周期事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* 安排 PWM 的脉冲事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[3]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[3]); SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL、 kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U,&SCT0_event_startCTimer); SCTIMER_SetCallback(SCT0_PERIPHERAL, SCT0_IRQHandler, SCT0_event_startCTimer); 启用 IRQ(SCT0_IRQn); } 下图显示了开始时的波形。目标是在黄色 PWM 信号的第四个上升沿开始蓝色 PWM 信号。 时钟|计时器 开发板 MCX N Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 您好@Kevin_Pang, 您遇到的问题似乎在下一个主题中讨论过。我建议按照 ZhangJennie 提供的建议进行操作,看看是否有助于解决问题。 BR Habib Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 亲爱的 Habib, 我试着运行了一个基本的 sdk 示例,但还是遇到了同样的错误。 谨致问候、 凯文 Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 你好 @Kevin_Pang,你 能否尝试运行一个 SDK 示例,比如 " hello_world、" 来确定异常是由你的代码引起的还是你的板特有的? BR Habib Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 亲爱的哈比卜 感谢您的联系。 我现在在开发板上遇到了问题。因此,在尝试调试我的项目时,它引发了一个异常:"Unable to open probe index 1" ,错误信息为:"Probe not open" 。之后,它就无法与核心连接了。在我的设置没有任何改变的情况下,这种情况突然发生了。您能帮我解决这个问题吗? 谨致问候, Kevin Pang Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 您好@Kevin_Pang, ,很高兴您的问题得到了解决。如果有什么需要我帮忙的,请告诉我。 BR Habib Re: SCTIMER Interupt Usage on FRDM-MCXN947 board 问题解决了: 我已经找到了正确编程中断的解决方案。代码实现如下(CTIMER init 未显示): void SCT0_IRQHandler(void) { SCTIMER_EventHandleIRQ(SCT0_PERIPHERAL); } 无效 启动_CTIMER(void) { // 只有当 SCTIMER 达到状态 2 时才启动 CTIMER CTIMER_StartTimer(CTIMER0_PERIPHERAL); PRINTF("CTIMER started from SCTIMER state 2 event.\r\n"); } 常数 sctimer_config_tSCT0_initConfig = { .enableCounterUnify = true、 .clockMode = kSCTIMER_System_ClockMode, .clockSelect = kSCTIMER_Clock_On_Rise_Input_0, .enableBidirection_l = false、 .enableBidirection_h = false、 .prescale_l = 0U、 .prescale_h = 0U、 .outInitState = 0U、 .inputsync = 0U }; 常数 sctimer_pwm_signal_param_tSCT0_pwmSignalsConfig[4] = { { .输出 = kSCTIMER_Out_0, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 50U }, { .输出 = kSCTIMER_Out_1, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 100U }, { .输出 = kSCTIMER_Out_1, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 0U }, { .输出 = kSCTIMER_Out_1, .level = kSCTIMER_HighTrue, .dutyCyclePercent = 0U } }; uint32_tSCT0_pwmEvent[4]; uint32_tSCT0_event[4]; uint32_tSCT0_event_startCTimer; 静态 void SCT0_init(void) { SCTIMER_Init(SCT0_PERIPHERAL,&SCT0_initConfig); /* 启用 NVIC 中的中断 SCT0_IRQN 请求 */ /* 状态 0 初始化 */ SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[0]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[0]); SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[2]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[2]); SCTIMER_CreateAndScheduleEvent(sct0_peripheral、 kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U,&SCT0_event[0]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 1, SCT0_event[0]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状态 1 初始化 */ /* 为 PWM 安排周期事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* 安排 PWM 的脉冲事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[1]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[1]); SCTIMER_CreateAndScheduleEvent(sct0_peripheral、 kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U,&SCT0_event[1]); SCTIMER_SetupNextStateAction(SCT0_PERIPHERAL, 2, SCT0_event[1]); SCTIMER_IncreaseState(SCT0_PERIPHERAL); /* 状态 2 初始化 */ /* 为 PWM 安排周期事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0]); /* 安排 PWM 的脉冲事件 */ SCTIMER_ScheduleEvent(SCT0, SCT0_pwmEvent[0] + 1); SCTIMER_SetupPwm(SCT0_PERIPHERAL,&SCT0_pwmSignalsConfig[3]、 kSCTIMER_EdgeAlignedPwm, 100U, SCT0_CLOCK_FREQ,&SCT0_pwmEvent[3]); SCTIMER_CreateAndScheduleEvent(sct0_peripheral、 kSCTIMER_OutputRiseEvent, 0, kSCTIMER_Out_0, kSCTIMER_Counter_U,&SCT0_event_startCTimer); SCTIMER_SetCallback(SCT0_PERIPHERAL, Start_CTIMER, SCT0_event_startCTimer); SCTIMER_EnableInterrupts(SCT0, (1U<< SCT0_event_startCTimer)); 启用 IRQ(SCT0_IRQn); }  
View full article
flash.bin FRDM IMX93 Hi all, I am using FRDM iMX93. As unpacked I tried to follow https://www.nxp.com/document/guide/getting-started-with-frdm-imx93:GS-FRDM-IMX93?section=build-and-run and all works perfect. Now I want my custom u-boot, ATF, OPTEE. I used same hash as the yocto and builds perfectly. I use mkimage to create the flash.bin and all fine untill this point. But ... when I try to flash this flash.bin (using Balena) nothing happens in console. I tried to use from the working yocto the flash,bin but the same, no boot. How can I created a bootable image using only flash.bin? When I see u-boot boots will add the kernel rootfs later. Regards, anpa Re: flash.bin FRDM IMX93 So for me this was the solution: dd if=iMX93/flash.bin of=bootable.img bs=1K seek=32 conv=fsync than with Balena bootable.img is booting. Ineed to figure out why I have some error but at least I see the console output: U-Boot SPL 2024.04-00003-g7e135e087e8 (Jul 19 2025 - 19:10:15 +0000) SOC: 0xa1009300 LC: 0x40010 PMIC: PCA9451A PMIC: Over Drive Voltage Mode Error: ele_volt_change_start_req: ret -5, response 0xf429 Error: ele_volt_change_finish_req: ret -5, response 0xf429 DDR: 3733MTS DDR: 3733MTS found DRAM 2GB DRAM matched M33 prepare ok Normal Boot Trying to boot from BOOTROM Boot Stage: Primary boot image offset 0x8000, pagesize 0x200, ivt offset 0x0 Load image from 0x40400 by ROM_API "Synchronous Abort" handler, esr 0x02000000 elr: 00000000204e0000 lr : 000000002049dafc x 0: 00000000204e0000 x 1: 0000000020501ba0 x 2: 0000000000000fc0 x 3: 0000000083200040 x 4: 00000000204b6958 x 5: 0000000083200450 x 6: 0000000000000001 x 7: 0000000083200450 x 8: 00000000000000f0 x 9: 00000000796d7959 x10: 00000000796d7959 x11: 0000000000000001 x12: 0000000000000001 x13: 0000000000000012 x14: 0000000000000001 x15: 0000000000000003 x16: 00000000204a5ef4 x17: 0000000000000000 x18: 0000000020501c10 x19: 00000000204b9af8 x20: 00000000204b9ae0 x21: 0000000020501bb0 x22: 00000000deadbeef x23: 00000000204b9ae0 x24: 000000000000000f x25: 0000000000000000 x26: 00000000204ad81c x27: 00000000204ad000 x28: 00000000204ad804 x29: 0000000020501b30 Code: 00000000 00000000 00000000 00000000 (00000004) Resetting CPU ... resetting ... Re: flash.bin FRDM IMX93 Thx for reply I will try this out. If this works than it means uuu tool inserts some header which is recognized by the ROM boot? Is there any detailed documentation about the boot sequence? Re: flash.bin FRDM IMX93 Hello, I suggest you use UUU instead Balena. Please try the next command: uuu -b flash.bin Best regards.
View full article
Zephyr を実行する MIMXRT1180-EVK 用の Gen AVB TSN スタックを構築する 標的: Zephyr を実行している CM7 ターゲット上で MIMXRT1180-EVK ボード用の Gen AVB TSN スタックを構築しようとしています。 https://github.com/NXP/GenAVB_TSN FreeRTOS用の設定ファイルがあります: config_freertos_rt1189_cm7.cmake しかし、Zephyr の場合は違います。Zephyr には次の機能があります。 config_zephyr_imx8mm_ca53.cmake config_zephyr_imx8mn_ca53.cmake config_zephyr_imx8mp_ca53.cmake config_zephyr_imx93_ca55.cmake 入力が必要です: 誰か、参考として、上で述べた Zephyr ターゲットの 1 つ用にこれを構築する方法を共有してもらえませんか。 また、誰かが私のアプローチを見て、正しい方向に進んでいるかどうかをCAN確認してくれると嬉しいです。 私が試したこと: 私が採用しているアプローチは、GEN AVB TSN スタックをライブラリとして組み込んだ Zephyr アプリケーションを構築しようとすることです。私のワークスペースでは、github からソースコードを取得しました。 |- ワークスペース | |- GenAVB_TSN | |- rtos抽象化レイヤー | |- ゼファープロジェクト | |- mcux_sdk_main | |- zephyr-genavb-demo --> Zephyr アプリケーション | | |- CMakeLists.txt | | |- ローカル構成_mimxrt1180_evk_mimxrt1189_cm7.cmake | | |- ソース | | | |- メイン.c なお、Zephyr のセットアップはすでに完了しており、次のコマンドを使用して CM7 ターゲット用の hello_world アプリケーションをビルドできます。 cd ~/zephyrproject/zephyr west ビルド -p -b mimxrt1180_evk/mimxrt1189/cm7 サンプル/hello_world GenAVB_TSN は 7_1 ブランチにあり、config_zephyr_imxrt1189_cm7.cmake を追加しました: Zephyr アプリケーションには 2 つのメイン ファイルがあります。CMakeLists.txt と local_config_mimxrt1180_evk_mimxrt1189_cm7.cmake ビルドに使用するコマンド: cd ~/zephyrproject/zephyr west ビルド -p -b mimxrt1180_evk/mimxrt1189/cm7 ~/zephyr-genavb-demo/ --sysbuild Re: Build Gen AVB TSN stack for MIMXRT1180-EVK running Zephyr こんにちは@SDC ご辛抱いただきありがとうございます。社内で協議しており、以下にコメントを共有させていただきます。 現時点では、MCU をターゲットとする場合、Zephyr で GenAVB/TSN スタックをコンパイルするための公式かつテスト済みの方法はありません。README の表に示されているように、現時点では i.MX 8M バリアントと i.MX 93 のみがサポートされています。(サポートされているハードウェア ターゲットと構成) NXP ガイドラインでは、お客様の開発プロセスも、当社側からサポートを追加するためのタイムラインもサポートされていません。 FreeRTOS 用にコンパイルされた i.MX 93 スタックと Zephyr 用にコンパイルされた i.MX 93 スタックの違いを正確に判別することはできません。おそらく、ユーザー自身が i.MX RT1180 のコンパイルを成功させることは技術的には可能 (多大な努力が必要です) ですが、それを強くお勧めしません。 今回はサポートできず申し訳ございません。 ディエゴ Re: Build Gen AVB TSN stack for MIMXRT1180-EVK running Zephyr こんにちは@SDC お問い合わせいただきありがとうございます。 i.MX MPU ターゲットについては、Harpoon プロジェクト(https://github.com/NXP/GenAVB_TSN?tab=readme-ov-file#zephyr)でのみCAN参照できます。 i.MX RT1180 の AVB TSN Zephyr 統合に関しては、現在このトピックを確認中です。後ほどご連絡いたします。 ディエゴ
View full article
当 MEM_43_INFLS_AC_LOAD_ON_JOB_START 启用时,S32K3 memacc 在 pflash 上工作会导致硬故障 当 MEM_43_INFLS_AC_LOAD_ON_JOB_START 启用时,S32K3 memacc 在 pflash 上工作会导致硬故障 内存中的数据与 pflash 中的代码完全相同 Re: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on 您好, 您解决这个问题了吗? 我有同样的行为,有什么建议吗? 非常感谢! 回复: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on 你好,我是@琦茂-马文、 能否说明热电阻的修订版本和 S32K3xx 部件号? 或者您能分享整个项目吗? 谢谢! BR,丹尼尔 回复: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on 因为我试图擦除的地址是在函数库中,0x400000 - 0x500000 是一个库,但即使我把代码放到内存中,也会导致硬故障,但如果我在 0x500000 处擦除,函数运行良好。 Re: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on 你好,我是@琦茂-马文、 您能说明 S32K3xx 部件号和您编程的扇区吗? 您能分享一下这个项目吗? 关于硬故障,您能找到有关故障的更多信息吗? 请遵循以下指导原则: https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Handling-Interrupt-DS3-5-RTD300/ta-p/1806259 https://community.nxp.com/t5/S32K-Knowledge-Base/How-To-Debug-A-Fault-Exception-On-ARM-Cortex-M-V7M-MCU-S32K3XX/ta-p/1595570 https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447 BR,丹尼尔
View full article
NHS3152 被动测量 大家好 我在定制的 PCB 上安装了 NHS3152。印刷电路板非常简单,只有一个用于 MCU-Link Pro 的 SWD 连接器,以及一些连接丝网印刷天线的连接器。为了实现功率稳定性,两个引脚 3 & 引脚 7 都有 2 个 100nF 电容并联(总共 4 个电容)。 我在电阻测量方面遇到一个问题。我有两个用于电阻测量的通道(通道 0 = 引脚 0、1;通道 1 = 引脚 4、5;)。当我在板处于被动运行状态(调试器没有电源)时进行电阻测量时,我的 NFC 扫描仪(适用于 Arduino Uno 的 Adafruit PN532 子卡)无法接收任何数据。不过,当 NHS3152 从我的调试器接收电源时,它确实能从测量中接收到正确的数据。 如果禁用代码中与电阻测量有关的部分,我就能成功读取 NFC 内容,因此我怀疑 ADC 消耗了太多电能? 如能得到任何帮助,我们将不胜感激。 IDE:MCUXpresso v24.9.25 SDK: release_mra2_12_6_nhs3152 扫描仪在读取失败时的输出(以被动模式运行): ================================================= Tag 找到并激活!准备读取数据 UID 长度:7 字节 UID 值:0x04 0x8E 0xE6 0x00 0x00 0xA8 0x00 0x10----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------从第 8-12 页读取数据读取第 8 ================================================= 标签丢失或通信失败。正在重置... =========================== 通过调试器为 NHS3152 供电时扫描仪的输出: ================================================= Tag 找到并激活!准备读取数据 UID 长度:7 字节 UID 值:0x04 0x8E 0xE6 0x00 0x00 0x00 0x10 --------------------------------------------------------------------------------------------------------------------------------------- -第 08 页:6E 52 31 3A nR1:第 09 页:34 2C 52 32 4,R 2 第 10 页:3A 2D 31 FE:-1 第 11 页:86 56 4D 3D VM= 第 12 页:84 28 57 0= 第 12 页:84 28 57 0= 第 12 页:84 28 57 0= 第 12 页:84 28 57 0= 第 12 页:84 28 57 0= 第 12 页 C (W. 数据读取成功。标签仍然存在。 ---------------------------------------- NHS3152 main.c: /* * 詹姆斯 哈罗德, 2025, 赛昂 * * 该程序测量两个独立 模拟 通道 的电阻 * 并将结果写入 NFC 标签以进行无线读取。 * */ // 1. #include " board.h " #include "ndeft2t/ndeft2t.h" #include #include "pmu_nss.h" #include "gpio_nss.h" #include #include #include // 2. #defineCHANNEL_0 0 // 电容& 电阻通道 #defineCHANNEL_1 1 // 电阻通道 #defineNUM_CHANNELS 2 // 测量通道总数 // 3. 全局变量 // 用于创建 NDEF 信息的缓冲区(用于 NFC) 静态uint8_t g_ndeft2tInstanceBuffer[NDEFT2T_INSTANCE_SIZE] ((对齐(4));) __attribute__((对齐(4))); 静态uint8_t g_nfcMessageBuffer[NFC_SHARED_MEM_BYTE_SIZE] ((align (4);) __attribute__((对齐(4))); // 用于存储每个测量通道结果的数组 易失性int32_t measuredResistance[NUM_CHANNELS] = {0, 0}; // 4. 回调(库需要,但未使用) void NDEFT2T_FieldStatus_Cb(bool status) { (void)status; } void NDEFT2T_MsgAvailable_Cb(void) { /* 未使用 */} // 5. 函数原型 无效 设置电源稳定(void); 无效 设置电阻测量(通道通道); int32_t 执行并计算阻力(通道通道); 无效 WriteMeasurementsToNFC(int32_t res1, int32_t res2); 无效 WriteHelloMessageToNFC(void); // 6. 主代码 int main(void) { //第 1 步:执行最低限度的板和电源设置 Board_Init(); setupPowerStabilis at ion ();//必须尽早执行才能从 NFC 标签收集能量 // --- 为将要使用的外设启用时钟和电源 --- --- 为将要使用的外设启用时钟和电源 Chip_Clock_Peripheral_EnableClock(时钟外设_adcdac| 时钟外设_i2d); Chip_SysCon_Peripheral_EnablePower(syscon_peripheral_power_adcdac| syscon_peripheral_power_i2d); // 稍微延迟以稳定电源和时钟 Chip_Clock_System_BusyWait_us(100); // --- 电阻测量初始化 --- //初始化外设并配置模拟引脚 Chip_ADCDAC_Init(NSS_ADCDAC0); Chip_I2D_Init(NSS_I2D); //为通道 0(ANA0_0、ANA0_1)配置 模拟 引脚 Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_0, iocon_func_1); Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_1, iocon_func_1); //为通道 1(ANA0_4、ANA0_5)配置 模拟 引脚 Chip_IOCON_SetPinConfig(NSS_IOCON.IOCON_ANA0_4) IOCON_ANA0_4, iocon_func_1); Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_ANA0_5, iocon_func_1); // 将 ADC 设置为较窄的电压范围(1.0V) Chip_ADCDAC_SetInputRangeADC(NSS_ADCDAC0、 输入范围_窄); // 第 2 步:初始化 NFC 通信 Chip_NFC_Init(NSS_NFC); NDEFT2T_Init(); // 第 3 步:进行电阻测量 设置电阻测量(CHANNEL_0); measuredResistance[CHANNEL_0] = PerformAndCalculateResistance(CHANNEL_0); 设置电阻测量(CHANNEL_1); measuredResistance[CHANNEL_1] = PerformAndCalculateResistance(CHANNEL_1); //第 4 步:将测量值写入 NFC 标签 WriteMeasurementsToNFC(measuredResistance[CHANNEL_0], measuredResistance[CHANNEL_1]); //WriteHelloMessageToNFC(); //---使用后掉电外围设备以节省能源--- Chip_SysCon_Peripheral_DisablePower(syscon_peripheral_power_adcdac| syscon_peripheral_power_i2d); Chip_Clock_Peripheral_DisableClock(时钟外设_adcdac| 时钟外设_i2d); // 第 5 步:等待 NFC 外设中断 而(1) { __WFI(); } 返回0; // 应该永远不会达到 } // 7.函数声明 /** * @brief 配置硬件,以便在特定通道上进行电阻测量。 * @参数通道:要安装的测量通道(CHANNEL_0 或 CHANNEL_1) * @return Nothing */ 无效 设置电阻测量(int通道) { ADCDAC_IO_Tdac_pin I2D_INPUT_Ti2d_pin; 如果(channel == CHANNEL_1) { dac_pin = adcdac_io_ana0_4; i2d_pin = i2d_input_ana0_5; } 其他{ dac_pin = adcdac_io_ana0_0; i2d_pin = i2d_input_ana0_1; } Chip_ADCDAC_SetMuxDAC(NSS_ADCDAC0, dac_pin); Chip_ADCDAC_WriteOutputDAC(NSS_ADCDAC0, 0xFFF); // 从 0xFFF 改为 0x800,以降低 DAC 输出电压 Chip_I2D_SetMuxInput(NSS_I2D, i2d_pin); 如果(channel == CHANNEL_0) { Chip_I2D_Setup(NSS_I2D、 I2D_single_shot, I2D_SCALER_GAIN_100_1, i2d_converter_gain_low, 10); // 将 I2D 转换周期从 100 改为 10(省电) } 其他{ Chip_I2D_Setup(NSS_I2D、 I2D_single_shot, I2D_SCALER_GAIN_100_1, i2d_converter_gain_low, 10); // 将 I2D 转换周期从 100 改为 10(省电) } // 等待片刻,使电压和电流趋于稳定。 Chip_Clock_System_BusyWait_ms(1); } /** * @brief 初始化 GPIO 以启用电容组以实现功率稳定性。 * @return Nothing * 注:这是被动运行最关键的初始化。 */ 无效 设置电源稳定(void) { Chip_IOCON_Init(NSS_IOCON); Chip_GPIO_Init(NSS_GPIO); // --- 第 1 阶段:预热 --- // 将引脚配置为 INPUTS,并启用内部上拉电阻。 //这允许外部电容缓慢充电而不会导致电压下降。 Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_PIO0_3, iocon_func_0 | iocon_rmode_pullup); // 将引脚 3 配置为 GPIO 并启用上拉功能 Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0, 3); // 将引脚 3 配置为输入 Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_PIO0_7, iocon_func_0 | iocon_rmode_pullup); // 将引脚 7 配置为 GPIO 并启用上拉功能 Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0, 7); // 将引脚 7 配置为输入 //稍等片刻,让电容充电。 Chip_Clock_System_BusyWait_ms(60); // 约.60ms 的 4 个时间常数(每个引脚都连接有 200nF) // --- 第 2 阶段:参与 --- // 现在电容已经充好电,我们可以安全地将它们连接到电源轨上了 // 将引脚设置为 OUTPUT 并将其驱动为高电平。 Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_PIO0_3, iocon_func_0 | iocon_rmode_inact); // 将引脚 3 配置为 GPIO 并禁用上拉功能 Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 3); // 将引脚 3 配置为输出 Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 3); // 将引脚 3 设置为高电平,将其连接至 VDD 电压轨 Chip_IOCON_SetPinConfig(NSS_IOCON、 IOCON_PIO0_7, iocon_func_0 | iocon_rmode_inact); // 将引脚 7 配置为 GPIO 并禁用上拉功能 Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 7); // 将引脚 7 配置为输出 Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 7); // 将引脚 7 设置为高电平,将其连接至 VDD 电压轨 } /** * @brief 用两个电阻值创建一个 NDEF 报文,并将其写入内存。 * @参数res1 : 第一个通道的原始电阻值。 * @参数res2 : 第二通道的原始电阻值。 * @return Nothing */ 无效 WriteMeasurementsToNFC(int32_t res1, int32_t res2) { charpayloadText[64]; ndeft2t_create_record_info_tcreateRecordInfo; uint8_t locale[] = "en"; snprintf(payloadText、 sizeof(payloadText)、 "R1:%ld,R2:%ld",res1,res2); NDEFT2T_CreateMessage(g_ndeft2tInstanceBuffer, g_nfcMessageBuffer、 NFC_SHARED_MEM_BYTE_SIZE,true); 创建记录信息。短记录= 1; 创建记录信息。pString= locale; 如果(NDEFT2T_CreateTextRecord(g_ndeft2tInstanceBuffer,&createRecordInfo)) { 如果(NDEFT2T_WriteRecordPayload(g_ndeft2tInstanceBuffer, (uint8_t*)payloadText、 strlen(payloadText))){ NDEFT2T_CommitRecord(g_ndeft2tInstanceBuffer); } } NDEFT2T_CommitMessage(g_ndeft2tInstanceBuffer); } /** * @brief 创建一个简单的 NDEF 文本信息"hello" 并将其写入 NFC 存储器。 * @return Nothing */ 无效 WriteHelloMessageToNFC(void) { charpayloadText[] = "香蕉"; ndeft2t_create_record_info_tcreateRecordInfo; uint8_t locale[] = "en"; // 1.开始在缓冲区中创建新的 NDEF 消息。 NDEFT2T_CreateMessage(g_ndeft2tInstanceBuffer, g_nfcMessageBuffer、 NFC_SHARED_MEM_BYTE_SIZE, true /* isFirstMessage */); // 为新的 NDEF 文本记录准备信息。 创建记录信息。短记录= 1; 创建记录信息。pString= locale; // 3.在信息中创建文本记录结构。 如果(NDEFT2T_CreateTextRecord(g_ndeft2tInstanceBuffer,&createRecordInfo)) { // 4. 将实际的"hello" 字符串写入记录的 有效负载. 如果(NDEFT2T_WriteRecordPayload(g_ndeft2tInstanceBuffer, (uint8_t*)payloadText、 strlen(payloadText))){ // 5.最终确定该具体记录。 NDEFT2T_CommitRecord(g_ndeft2tInstanceBuffer); } } // 6. 完成最终完成整个信息,并将其提供给 NFC 硬件。 NDEFT2T_CommitMessage(g_ndeft2tInstanceBuffer); } /** * @brief 执行 ADC 和 I2D 转换,并计算特定通道的电阻。 * @参数channel : 要测量的测量通道(CHANNEL_0 或 CHANNEL_1) * @return 按比例缩放的原始电阻值,如果出现错误(如开路),则返回-1。 * 注使用低功耗的 __WFE() 等待转换,这对被动模式至关重要。 */ int32_t 执行并计算阻力(int通道) { int32_t v_drive、v_sense、i2d_val、adc_diff、resistance_result; ADCDAC_IO_Tdrive_pin_adc、sense_pin_adc; /* * 注意:假设外设时钟和电源已在 main() 中启用。 * 如果从多个地方调用该函数,您可能会启用/禁用 * 而不是在这里。在此应用中,在 main() 中启用效率更高。 */ 如果(channel == CHANNEL_1) { 驱动器针脚 ADC = adcdac_io_ana0_4; 感测针 ADC = adcdac_io_ana0_5; } 其他{ 驱动器针脚 ADC = adcdac_io_ana0_0; SENSING_PIN_ADC = adcdac_io_ana0_1; } // --- V_DRIVE ADC 测量 --- Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0, drive_pin_adc); Chip_ADCDAC_StartADC(NSS_ADCDAC0); // 新的低功耗方式:休眠直到 ADC 转换完成。 同时(!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0)& ADCDAC_STATUS_ADC_DONE)){ { /* 等待 */} } v_drive = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0); // --- V_SENSE ADC 测量 --- Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0, sense_pin_adc); Chip_ADCDAC_StartADC(NSS_ADCDAC0); // 休眠,直到 ADC 转换完成。 同时(!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0)& ADCDAC_STATUS_ADC_DONE)){ { /* 等待 */} } v_sense = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0); // --- I2D 测量 --- Chip_I2D_Start(NSS_I2D); // 休眠,直到 I2D 转换完成。 同时(!(Chip_I2D_ReadStatus(NSS_I2D)& i2d_status_conversion_done)){ { /* 等待 */} // 等待事件 - 在 ADC_DONE 事件发生时唤醒 --> 用 busy waits 代替 __WFE() {} } i2d_val = Chip_I2D_GetValue(NSS_I2D); /* * 注意:外围设备保持通电状态,以便进行下一次测量。 * 它们将在 main() 结束时关闭电源。 */ // --- 计算 --- adc_diff = v_drive - v_sense; 如果(adc_diff< 1) { adc_diff = 1; } 如果(i2d_val> 0) { resistance_result = ((uint32_t)adc_diff * 10000) / i2d_val; } 其他{ resistance_result = -1; // 表示开路或错误 } 返回resistance_result; } ntag2xx_read.ino: /**************************************************************************/ /*! @文件 readntag_continuous_power_and_data.ino @ 作者 KTOWN (Adafruit Industries) / 经过修改,可连续读取电源和数据 @licenseBSD(见 license.txt) 此版本保持被动 NFC 标签持续供电,并且每个标签都处于开启状态 循环,读取并显示特定页面(8-13)范围内的数据。 当标签被移除时,它会RESET。 */ /**************************************************************************/ #include #include #include // 如果使用带 SPI 的断路器,请定义用于 SPI 通信的引脚。 #define PN532_SCK (SCK) #define PN532_MISO(MISO) #define PN532_MOSI(MOSI) #define PN532_SS (10)// 或您使用的任何 SPI CS 引脚 //如果在 I2C 中使用突破或子卡,则为 I2C 定义引脚 // 并注释 SPI 定义。 #define PN532_IRQ (2) #define PN532_RESET(3) // 这一行用于 I2C Adafruit_PN532 nfc(pn532_irq, pn532_reset); // 或使用这一行进行 SPI // Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS); // 全局状态变量用于跟踪标签是否被选中 booltagIsPresent = 假; uint8_tuid[] = { 0, 0, 0, 0, 0, 0, 0}; uint8_tuidLength; intpageStart = 8; intpageEnd = 12; 无效 设置(void) { 系列.开始(115200); 当(!Serial) 延迟(10);// 适用于莱昂纳多/微处理器/零 nfc.开始(); uint32_t版本数据 = nfc.获取固件版本(); 如果(!versiondata) {     序列号。打印(" 没找到 PN53x 板 "); 虽然(1);// 停止   } 系列.打印("找到芯片 PN5"); 序列.打印((versiondata>> 24)& 0xFF,HEX); 系列.打印(", Firmware ver."); 序列号.打印((versiondata>> 16)& 0xFF, DEC); 序列号.打印('.'); 序列.println((versiondata>> 8)& 0xFF, DEC); //将板配置为监听 ISO14443A 卡 nfc.SAMConfig(); 系列.println("等待 ISO14443A 卡供电和读取..."); } 无效 loop(void) { // === 状态 1:未选择标签 === // 如果没有标签,请尝试查找。 如果(!tagIsPresent) { 序列号.打印(".");// 打印一个点,表示我们正在等待 // 等待卡片进入字段。这也提供了动力。 bool成功 = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid,&uidLength、 500); 如果(成功) { tagIsPresent = true; 系列.println("\n================================================="); 系列.println("标签已找到并激活!准备读取数据。"); 序列号 。 打印( " UID 长度:"); 序列号 。 打印 (UIDLength,DEC);序 列号。 println( " 字节 "); 系列.打印(" UID 值:"); nfc.PrintHex(uid, uidLength);       // 可选的延迟:如果你的标签是一个需要时间的传感器 // 开机后执行测量,在此处添加延迟时间。 // 对于许多传感器标签来说,200 毫秒是一个很好的起点。 延迟(200);    } // 如果失败或超时,循环将重新启动并再次尝试。 返回;   } // === 状态 2:标签被选中并通电 === // 如果有标签,尝试读取第 8 页至第 13 页的数据。 如果(tagIsPresent) { 系列.println("----------------------------------------"); 序列号.打印("从页面读取数据"); 序列号.打印(pageStart); 序列号.打印("-"); 系列.打印(页末); 系列.println();     boolall_reads_succeeded = true;     为(intpage = pageStart; page<= pageEnd; page++) { uint8_t page_d ata[ 4]; // NTAG 页面的长度为 4 字节       // 尝试读取当前页面 如果(nfc.ntag2xx_ReadPage(page, page_data)) { // 成功!打印数据。 系列.打印(" 页码"); 如果(页码< 10) 序列.打印("0");// 使对齐效果更佳 序列号.打印(页); 序列号.打印(":"); // nfc.PrintHexChar 是一个很好的辅助函数,可以打印十六进制和 ASCII 字符。 nfc.打印十六进制字符(页数据)、 4); } 否则{ // 读取失败!这是标签已被移除的信号。 系列.打印(" 读取页面失败"); 序列.println(页); all_reads_succeeded = false; 打破;// 立即退出 for 循环      }    } 如果(all_reads_succeeded) { 系列.println("数据读取成功。标签仍然存在。"); } 否则{ //如果任何读取失败,我们将 RESET 系统状态。 系列.println("\n=================================================");       序列号。println("标签丢失或通信失败。正在 RESET..."); 系列.println("================================================="); tagisPresent = false;//RESET状态 nfc.SAMConfig();// 重新配置阅读器以监听新标签    }     // 在下一个读取周期之前等待一个位。 延迟(2000);   } } Re: NHS3152 Passive Measurement 仅供参考。 NHS3152 仅由 NFC 现场和负载电容供电-NXP 社区 Re: NHS3152 Passive Measurement 嗨,吉米,谢谢你的回复。你认为向电容器组增加更多电容可能使ADC在被动模式下运行吗?如果是,执行这些操作所需的安全总电容值是多少。 Re: NHS3152 Passive Measurement 当板被动运行时,功率可能不够稳定,无法运行 ADC。
View full article
S32K3 memacc は pflash 上で動作し、MEM_43_INFLS_AC_LOAD_ON_JOB_START がオンのときにハードフォールトを引き起こします。 S32K3 memacc は pflash 上で動作し、MEM_43_INFLS_AC_LOAD_ON_JOB_START がオンのときにハードフォールトを引き起こします。 RAM内のデータはpflash内のコードと全く同じです Re: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on こんにちは、 この問題は解決しましたか? 私も同じ症状です。何かアドバイスはありますか? よろしくお願いします。 回复: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on こんにちは@qimao-marvinさん CAN RTD リビジョンと S32K3xx 部品番号を指定できますか? あるいはプロジェクト全体をCAN共有できますか? ありがとうございました。 BR、ダニエル 回复: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on 私が消去して関数のバンクに実行しようとしたアドレスは、0x400000 - 0x500000 の 1 つのバンクですが、コードを RAM に入れてもハードフォールトが発生しました。ただし、0x500000 で消去すると、関数は正常に実行されます。 Re: S32K3 memacc works on pflash causes hardfault when MEM_43_INFLS_AC_LOAD_ON_JOB_START is on こんにちは@qimao-marvinさん S32K3xx の部品番号とプログラムするセクターを指定できますか? CANプロジェクトを共有してもらえますか? ハードフォールトに関して、障害に関する詳細情報を入手できますか? 次のガイドラインに従ってください。 https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Handling-Interrupt-DS3-5-RTD300/ta-p/1806259 https://community.nxp.com/t5/S32K-Knowledge-Base/How-To-Debug-A-Fault-Exception-On-ARM-Cortex-M-V7M-MCU-S32K3XX/ta-p/1595570 https://community.nxp.com/t5/S32K-Knowledge-Base/S32K14x の障害処理/ta-p/1114447 BR、ダニエル
View full article
Build Gen AVB TSN stack for MIMXRT1180-EVK running Zephyr Aim: I am trying to build Gen AVB TSN stack for MIMXRT1180-EVK board on CM7 target running Zephyr. https://github.com/NXP/GenAVB_TSN It has configuration file for FreeRTOS: config_freertos_rt1189_cm7.cmake But not for Zephyr. It has the following for Zephyr: config_zephyr_imx8mm_ca53.cmake config_zephyr_imx8mn_ca53.cmake config_zephyr_imx8mp_ca53.cmake config_zephyr_imx93_ca55.cmake Input needed in: Can someone share how to build it for one of the Zephyr targets mentioned above for me to take as a reference. Also it would be great if someone can have a look at my approach and see if I am on the right track What I have tried: The approach that I am taking is that I am trying to build Zephyr application inncluding the GEN AVB TSN stack as a library. In my workspace I have pulled the source codes from github: |- workspace | |- GenAVB_TSN | |- rtos-abstraction-layer | |- zephyrproject | |- mcux_sdk_main | |- zephyr-genavb-demo --> Zephyr application | | |- CMakeLists.txt | | |- local_config_mimxrt1180_evk_mimxrt1189_cm7.cmake | | |- src | | | |- main.c Note, that Zephyr setup is already done and I am able to build hello_world application for CM7 target using the following commands: cd ~/zephyrproject/zephyr west build -p -b mimxrt1180_evk/mimxrt1189/cm7 samples/hello_world The GenAVB_TSN is on 7_1 branch and I added config_zephyr_imxrt1189_cm7.cmake: The Zephyr application has a 2 main files. CMakeLists.txt and local_config_mimxrt1180_evk_mimxrt1189_cm7.cmake Command that I use for build: cd ~/zephyrproject/zephyr west build -p -b mimxrt1180_evk/mimxrt1189/cm7 ~/zephyr-genavb-demo/ --sysbuild Re: Build Gen AVB TSN stack for MIMXRT1180-EVK running Zephyr Hi @SDC  Thank you for your patience, I have been consulting internally, let me share our comments below.  At this moment:  we do not have any official and tested way to compile the GenAVB/TSN stack under Zephyr when targetting any MCU. Only the i.MX 8M variants and i.MX 93 are supported, for now, as indicated in the table in the README. (Supported hardware targets and configurations) Neither NXP guidelines support your development process, or timeline to add support from our side. We  can not tell exactly the difference between, the i.MX 93 stack compiled for FreeRTOS and for Zephyr. Maybe it is technically feasible for  users to achieve successful compilation for i.MX RT1180 themselves (with great effort), but we strongly advise against it. We are sorry for not being able to support you this time. Diego Re: Build Gen AVB TSN stack for MIMXRT1180-EVK running Zephyr Hi @SDC  Thank you for reaching out.  For i.MX MPU targets the only reference can be seen in  the the Harpoon project  https://github.com/NXP/GenAVB_TSN?tab=readme-ov-file#zephyr Regarding the AVB TSN Zephyr integration for i.MX RT1180 , I am currently checking this topic, allow me to get back to you.  Diego
View full article
PN7462C/OM27462CDKP:アクセス制御アプリ用のAndroidおよびiPhoneからのNDEFデータの読み取りについてサポートが必要です 何とかしてPN7462AU用のNfcrdlibEx3_NFCForum_mcuxを入手し、以下のように物理 NFC タグ (NTAG215) とその NDEF データを読み取ることがCANました。   NFCフォーラムの例:   カードが検出され、正常に有効化されました タグの数: 1 テクノロジー:タイプA カード:1 UID: 04 FA D5 57 BD 2A 81 サック: 0x0 タイプ: タイプ2タグ NDEF が検出されました... NDEFの長さ: 15 NDEF メッセージ: [0000] D1 01 0B 54 02 65 6E 30 30 31 31 31 31 31 31 00 |...T.en00111111.| [0010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| [0020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| [0030] 00 00 |.. |   物理NTAG215を「 00111111 」のプレーンテキストでプログラムしました。   ここで、実際にタグ エミュレーション (少なくとも NDEF ペイロード エミュレーション) をサポートしている「 NXP Tools PRO 」アプリを使用してAndroid フォンでタグをエミュレートしようとすると、次のログが表示されます (同じプレーン テキスト「00111111」の場合)。   カードが検出され、正常に有効化されました タグの数: 1 テクノロジー:タイプA カード:1 UID: 08 EF 94 5D サック: 0x20 タイプ: タイプ4Aタグ NDEF コンテンツが検出されませんでした...   カードが検出され、正常に有効化されました タグの数: 1 テクノロジー:タイプA カード:1 UID: 08 F0 49 8D サック: 0x20 タイプ: タイプ4Aタグ NDEF コンテンツが検出されませんでした...   セキュリティ上の理由から、携帯電話の UID は取引ごとに変更されることは承知しています。 私のアプリケーションでは、アクセス制御アプリケーションに Android または iPhone のいずれかを使用し、NFC アプリケーションの NDEF ペイロードを認証に使用します (最初のステップとして)。 最終的な目標は、 Apple WalletまたはGoogle Walletに保存されているNFC パスを、それらのパスに埋め込まれた NDEF ペイロードを使用したアクセス制御の手段として使用することです (キットでそれが可能かどうか、またこれをサポートするために何が必要なのかはわかりません)。 また、Apple Wallet または Google Wallet を使用するには、コードにApple VASおよびGoogle SmartTapプロトコルを実装する必要があることもわかっています。 これらのプロトコルをデザインに統合するための例を取得するプロセスを説明できる人はいますか? 私はこのThreadを見つけました: Detecting-iOS-phone-using-PN7642で、 @Fabian_R が代理店に連絡することについて言及していますが、可能であれば、Apple VAS と Google SmartTap を統合するプロセスについて、さらに詳しい情報が必要です。 どなたかこのアプリケーションについて手伝っていただけますか? よろしくお願いします。 よろしくお願いいたします。 ヤシュ NFCコントローラーソリューション Re: PN7462C/OM27462CDKP:Need help reading NDEF data from Android and iPhone for Access Control App こんにちは、YRKさん 最近、PN7462 開発ボードを購入しました。NTAG215 で試したアプリケーション コードを共有していただけますか。NDEF 通信を理解するのに間違いなく役立ちます。 ありがとうございました。 スリー Re: PN7462C/OM27462CDKP:Need help reading NDEF data from Android and iPhone for Access Control App こんにちは@YRK https://www.nxp.com/support/support:SUPPORTHOMEにアクセスし、「 NDA をリクエスト」を選択して、NXP との NDA を確立してください。 Re: PN7462C/OM27462CDKP:Need help reading NDEF data from Android and iPhone for Access Control App こんにちは@YRK はい、ECP をシステムに統合する必要があります。PN7462 は Apple が開発した ECP 機能もサポートしているため、デザインで ECP を使用するには Apple からの許可が必要です。 ただ、詳細や ECP 対応ライブラリをお客様に提供することはできません。まずはAppleの承認を得なければなりません! このお客様が ECP 承認済みであることを Apple から承認された場合にのみ、当社は ECP 対応の NFCリーダ ライブラリとさらなる ECP サポートをお客様に提供できます。したがって、PN7462 に ECP 機能を実装する場合は、次のことを行う必要があります。 1. アプリケーションで ECP 機能を使用するために Apple から承認を得ます。 2. NXPとのNDAに署名する 3. NXP に戻って ECP デザインリソースを取得します。
View full article
采用定制 PN7462AU 读取器设计的 NTAG 424 DNA 验证问题 我们计划将 PN7462AU 和 NTAG 424 DNA 用于简单的嵌入式防伪应用,使用 Key0 主密钥验证标签是否正常。 该板已启动并正在运行,在调用 phalmfntag42xDNA_AuthenticateEV2 函数之前的 phpali14443p3A_ActivateCard 标签激活步骤之前 运行良好。我已经尝试了好几天才能使身份验证正常运行,尝试了空白标签和使用主密钥0编程的标签,但是无论我尝试了什么,都会出现 0x2626 错误 。 我在软件堆栈中记录了每个步骤的日志以帮助调试,这是控制台的打印件,显示了我在身份验证之前安装的所有层: 使用 phalHW_PN7462AU_init 初始化硬件抽象层 (HAL) HAL 已初始化! HAL ID: 0x020A 初始化 PAL、密钥存储和加密 初始化 phpalI14443p3a_Sw_Init phpalI14443p3a Initialized! 初始化 phpalI14443p4a_Sw_Init phpalI14443p4a 已初始化! 初始化 phpalI14443p4_Sw_Init phpalI14443p4 已初始化! 初始化 phpalMifare_Sw_Init Mifare 已初始化! 初始化 phCryptoSym_Sw_Init (cryptoSymEnc) phCryptoSym_Sw_Init cryptoSymEnc 成功! 初始化 phCryptoSym_Sw_Init (cryptoSymMac) phCryptoSym_Sw_Init cryptoSymMac 成功! 初始化 phCryptoRng_Sw_Init phCryptoRng_Sw_Init 成功! 初始化 phKeyStore_Sw_Init 密钥存储已初始化! 初始化 phKeyStore_SetConfig phKeyStore_SetConfig 未初始化! 初始化 phKeyStore_Sw_FormatKeyEntry 格式键输入成功! 初始化 phKeyStore_Sw_GetKeyEntry 获取密钥输入成功! 格式化键类型 = 0x000E 调用 phKeyStore_Sw_SetKeyAtPos 尝试使用密钥设置 SetKeyPosition: ab CD EF 09 ab CD EF 09 ab CD EF 09 ab CD EF 09 在条目 0x00 位置设置 AES-128 密钥: ab CD EF 09 ab CD EF 09 ab CD EF 09 ab CD EF 09 将按键设置在位置成功 调用 phKeyStore_GetKeyEntry phKeyStore_GetKeyEntry 成功! 密钥条目 0x00:1 个密钥,类型 = 0x000E,第一个版本 = 0x00 验证位置 0 的 KeyStore 密钥... 调用 phKeyStore_GetKey 成功找回密钥 初始化 phalMfNtag42XDna_Sw_Init Ntag42XDna_Sw_Init 成功! dna.wId = 0x2601 cryptoSymEnc.wId = 0xE101 cryptoSymMac.wId = 0xE101 cryptoRng.wId = 0xE401 ***系统初始化**** ********Processing Tag************ 调用 phhalHw_ApplyProtocolSettings ApplyProtocolSettings 成功! 通过 phpalI14443p3a_ActivateCard 激活标签 标签激活成功! 授权前的 UID: 04 2C 19 12 C4 1B 90 通过 phalMfNtag42XDna_AuthenticateEv2 验证标签 标签未经验证! 验证状态:0x2626 您能为我提供指导,说明我可能遗漏了什么吗? Re: NTAG 424 DNA authentication issues with custom PN7462AU reader design 现在我的系统终于可以正常工作了,并能验证 NTAG 424 标签。 我要说的是,我对恩智浦缺乏对该产品的支持感到非常愤怒。 告诉客户只需阅读数据表就可以了,这是一种糟糕的产品支持方式。 至少,恩智浦 NFC 工程人员应在 NxpNfcRdLib 阅读器库中添加一个简单的 NTAG 验证示例。 使用库元器件的步骤有很多,这些步骤根本没有记录在任何地方,我基本上必须记录 RFIDDiscover 在做什么,然后尝试对其进行复制。您的客户不应被迫对您的产品进行逆向工程才能使用它们! 最后,我使用 DiscoveryLoop 范例完成了 Flashboot 和 HAL 设置以及主要的 PAL 元素,然后将程序转换为 NULLOS,移除 DiscoveryLoop 死循环,按照 DiscoveryLoop 调用 PAL 的步骤操作,再逐步完成其余的 PAL 和 AL 步骤,使其正常工作。 这样,我就可以去除示例中所有可怕的臃肿。 在此过程中,我发现有许多人试图使用贵公司的 PN7462AU 产品和库,但都放弃了,因为贵公司没有提供任何实施文档。 Re: NTAG 424 DNA authentication issues with custom PN7462AU reader design 您有 PEGODA 吗? 它可与 RFIDDiscover 一起使用。您可以在 RFIDDiscover 上尝试同样的方法。 然后将日志与结果进行比较。 Re: NTAG 424 DNA authentication issues with custom PN7462AU reader design 因此,我认为是代码中的一些错误导致 Mifare 无法正确初始化,我修正了这些错误,现在看起来一切正常,直到 EV2 Authenticate,现在出现了 0x2682 错误。 下面是调试日志: 使用 phalHW_PN7462AU_init 初始化硬件抽象层 (HAL) HAL 已初始化! HAL ID: 0x020A HAL pTxBuffer:0x001000A0 HAL pRxBuffer:0x001001A8 初始化密钥存储 初始化 phKeyStore_Sw_Init 密钥存储已初始化! 初始化 phKeyStore_Sw_FormatKeyEntry 格式键输入成功! 在条目 0x00 位置设置 AES-128 密钥: ab CD EF 09 ab CD EF 09 ab CD EF 09 ab CD EF 09 将按键设置在位置成功 phCryptoSym_Sw_Init cryptoSymEnc 成功! 初始化 phCryptoSym_Sw_Init (cryptoSymMac) phCryptoSym_Sw_Init cryptoSymMac 成功! 初始化 phCryptoRng_Sw_Init phCryptoRng_Sw_Init 成功! 初始化 phpalI14443p3a_Sw_Init phpalI14443p3a Initialized! 初始化 phpalI14443p4a_Sw_Init phpalI14443p4a 已初始化! 初始化 phpalI14443p4_Sw_Init phpalI14443p4 已初始化! 初始化 phpalMifare_Sw_Init Mifare 已初始化! palMifare.pPalI14443p4DataParams= 0x001003D4 初始化 phCryptoSym_Sw_Init (cryptoSymEnc) 初始化 phalMfNtag42XDna_Sw_Init Ntag42XDna_Sw_Init 成功! dna.wId = 0x2601 cryptoSymEnc.wId = 0xE101 cryptoSymMac.wId = 0xE101 cryptoRng.wId = 0xE401 ***系统初始化**** ********Processing Tag************ 调用 phhalHw_ApplyProtocolSettings ApplyProtocolSettings 成功! 通过 phpalI14443p3a_ActivateCard 激活标签 标签激活成功! 通过 phpalI14443p4a_ActivateCard 激活标签 phpalI14443p4a_ActivateCard 成功! 调用 phpalI14443p4_SetProtocol SetProtocol 成功! 调用 phalMfNtag42XDna_GetVersion()。 获取版本成功。标签处于 ISO-DEP 模式。 版本: 04 04 02 30 00 11 05 04 04 测试 Mifare 原始交换... 交换测试状态:0x0000 交换测试 RxLen: 2 交换测试响应: 67 00 通过 phalMfNtag42XDna_AuthenticateEv2 验证标签 dna.pPalMifareDataParams:0x001003C0 palMifare.pPalI14443p4DataParams:0x001003D4 palI14443p4.pHalDataParams:0x001004F4 标签未经验证! 验证状态:0x2682 我认为我的测试密钥编程不正确,无法支持主密钥 0 上的 EV2,因此需要 RFIDDiscover 或已知好的样本密钥来进一步测试我的应用。 我已提交 NDA 申请,需要 RFIDDiscover 分析我的测试标签的 EV2 功能。 Re: NTAG 424 DNA authentication issues with custom PN7462AU reader design 在之前的帖子之后,我在更新后的日志中找到了对两个关键内容的参考,如下所示: -我最初看到的参考是 AES 密钥应设置为 0x0EU,我在之前发送的日志中使用了该密钥,导致了 0x2626 的身份验证错误。在大多数其他文档中,它说只需保留 phKeyStore 中的默认设置 0x00U,我已经更新到这个设置。在随附的日志中,这现在会导致 0x0220 的身份验证错误。 -我还在 phpali14443p3A_ActivateCard 和 phalmfntag42xdna_AuthenticateEV2 之间添加了两个函数调用,如下所示:-phpali14443p4a_getProtocolParams-phpali14443p4_setProtocol 我还会遇到身份验证错误 0x0220 。 以下是控制台日志: 使用 phalHW_PN7462AU_init HAL 初始化硬件抽象层 (H AL) 已初始化! HAL ID: 0x020A *********初始化 PAL、KeyStore 和 Crypto********** Initializing phpalI14443p3a_Sw_Init phpalI14443p3a Initialized! 初始化 phpalI14443p4a_Sw_Init phpalI14443p4a 已初始化! 初始化 phpalI14443p4_Sw_Init phpalI14443p4 已初始化! 初始化 phpalMifare_Sw_Init Mifare 初始化! 初始化 phCryptoSym_Sw_Init (cryptoSymEnc) phCryptoSym_Sw_Init cryptoSymEnc 成功! 初始化 phCryptoSym_Sw_Init (cryptoSymMac) phCryptoSym_Sw_Init cryptoSymMac 成功! 初始化 phCryptoRng_Sw_Init phCryptoRng_Sw_Init 成功! 初始化 phKeyStore_Sw_Init 已初始化密钥存储! 初始化 phKeyStore_SetConfig phKeyStore_SetConfig 未初始化! 初始化 phKeyStore_Sw_FormatKeyEntry 格式密钥项成功! 初始化 phKeyStore_Sw_GetKeyEntry 获取密钥条目成功! 格式化键类型 = 0x0000 调用 phKeyStore_Sw_SetKeyAtPos 尝试使用密钥设置密钥位置: AB CD EF 09 AB CD EF 09 AB CD EF 09 在条目 0x00、位置 0x00 设置 AES-128 密钥: AB CD EF 09 AB CD EF 09 AB CD EF 09 AB CD EF 09 在位置设置密钥成功 调用 phKeyStore_GetKeyEntry phKeyStore_GetKeyEntry 成功! KeyEntry 0x00:1 个密钥,类型 = 0x0000,第一个版本 = 0x00 验证位置 0 的 KeyStore 密钥... 调用 phKeyStore_GetKey 成功检索密钥! 密钥类型 = 0x0000 初始化 phalMfNtag42XDna_Sw_Init Ntag42XDna_Sw_Init 成功! dna.wId = 0x2601 cryptoSymEnc.wId = 0xE101 cryptoSymMac.wId = 0xE101 cryptoRng.wId = 0xE401 ***系统初始化**** ********Processing Tag************ 调用 phhalHw_ApplyProtocolSettings ApplyProtocolSettings 成功! 通过 phpalI14443p3a_ActivateCard 激活标签 标签激活成功! 调用 phpalI14443p4a_GetProtocolParams GetProtocolParams 成功! 调用 phpalI14443p4_SetProtocol SetProtocol 成功! 认证前的 UID: 04 2C 19 12 C4 1B 90 认证中使用的密钥:AB CD EF 09 AB CD EF 09 AB CD EF 09 AB CD EF 09 通过 phalMfNtag42XDna_AuthenticateEv2 验证标签 标签未验证! 验证状态:0x0220 通过 phalMfNtag42XDna_GetKeyVersion 检索密钥版本 GetKeyVersion 失败。状态:0x0220  
View full article
AMMCLIB 与 RTD 的依赖关系 你好 我目前正在使用 Windows 版 S32 Design Studio 3.6 处理 S32K344 微控制器。我手动添加了AMMCLIB 1.1.40 版我的项目基于RTD 5.0.0。 到目前为止,项目的编译和链接都没有问题。不过,我目前只用到了库中的一些数学函数。 在浏览论坛时,我注意到由于某些AMMCLIB版本的兼容性问题,建议一些用户恢复到早期的RTD版本。 谁能确认一下AMMCLIB 1.1.40 是否存在这种不兼容性? 我查看了文档,但找不到明确的参考,说明此 AMMCLIB 版本正式支持哪些 RTD 版本。 如能提供任何说明,将不胜感激。 在此先表示感谢! Re: AMMCLIB vs RTD Dependencies 嗨,罗杰、 在 AMMCLib 1.1.41 版中添加了对 S32 Design Studio 3.6 的支持,该版本自 2025 年 7 月 14 日起作为更新站点提供。最新版本可从该版本库中获取: http://www.nxp.com/lgfiles/updates/Eclipse/AMMCLIB/S32DS_3.6 AMMCLib 不依赖于 RTD API,可以在没有 RTD 的情况下使用。不过,当您从"Extensions and Updates" 对话框将 AMMCLib 作为 S32DS 插件安装时,您需要有一个兼容的 RTD 版本,因为所有 S32DS 插件都依赖于 RTD 设置的编译选项。如果您尚未安装 RTD,Eclipse P2 安装程序会通知您需要哪个版本的 RTD。 Re: AMMCLIB vs RTD Dependencies 您好, 非常感谢您关注我们的产品并使用我们的社区。 为明确起见,S32DS 有两种安装 AMMCLIB 的方法,请参阅S32K3XXMCLUG 的以下部分: 2.10 库作为 RTD 插件集成到适用于 S32 平台的 S32 设计工作室 2.11 库作为 独立组网 (SA) 软件包集成到适用于 S32 平台的 S32 设计工作室 RTD 插件方式仅适用于 S32DS 3.5,我已测试了 AMMCLIB_v1.1.40使用 RTD 4.0.0 和 RTD5.0.0 时没有任何问题。 如果你使用的是 S32DS 3.6,请使用*.exe 安装程序遵循独立组网。 请注意,如果用户选择在其 S32DS 项目中手动添加 AMMCLib,他们有责任确保编译器选项遵循 AMMCLib 版本说明 中描述的建议。 祝您愉快
View full article
Model based design installtion problem Im getting errors on verfiying the installed nxp packages in matlab >> NXP_Support_Package_S32K1xx Error using contains First argument must be text. Error in NXP_Support_Package_S32K1xx>OpenToolbox_Callback (line 231) result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K1xx'); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in gui_mainfcn (line 95) feval(varargin{:}); ^^^^^^^^^^^^^^^^^^ Error in NXP_Support_Package_S32K1xx (line 34) gui_mainfcn(gui_State, varargin{:}); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)NXP_Support_Package_S32K1xx('OpenToolbox_Callback',hObject,eventdata,guidata(hObject))   Error using matlab.ui.internal.controller.uicontrol.UIControlController/triggerActionEvent (line 76) Error while evaluating UIControl Callback.   Re: Model based design installtion problem Hello Jerry, I just had the same problem.  In NXP_Support_Package_S32K3xx.m, replace these lines :  result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3xx');   with:  if isempty(toolboxes(i).Name) else result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3xx'); end   In my case, it seems like the toolboxes variable had an empty member, which caused the error.  You need to do this replacement three times in the .m. Hope this helps, Alex   Re: Model based design installtion problem So how to solve it?? Re: Model based design installtion problem Hello, The key error here is: Error using contains First argument must be text. This means the variable toolboxes(i).Name passed to contains is not a string or char array, which it must be. Best Regard, Tim
View full article
OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Issue Summary We are encountering a failure during Matter multi-admin commissioning using OTBR with the JN5189 RCP. The primary commissioning using the CHIPTool Android APK completes successfully. However, the secondary commissioning using the CHIP Tool CLI fails. During this process, the otbr-agent logs indicate repeated timeouts when communicating with the RCP, which causes the agent to become unresponsive. The only way to recover is by manually resetting the agent or replugging the RCP. Setup Details Component: Version / Description -----------------------------|-------------------------------------------------------- Primary Commissioner       :        CHIPTool Android APK Secondary Commissioner :       CHIP Tool CLI (Linux) Thread Device                      :        Nanoleaf A27 Bulb RCP Platform                         : NXP JN5189 over UART RCP Firmware Commit: dfbe12280af4a87cb9ae0c0c1d90d71de3372d82 (from ot-nxp) OTBR Platform: Ubuntu 22.04 (x86_64) Kernel Version: Linux 6.8.0-60-generic ##63~22.04.1-Ubuntu SMP PREEMPT_DYNAMI OTBR Commit: b8bab1babcb040251b51a69ccb4008fb4b9e2d3f CHIP Tool CLI Commit: 9af93fd3e9eab4315e1097b19112ebac01d1ad94 Steps to Reproduce Boot the OTBR with the JN5189 RCP connected and initialized. Perform primary commissioning using the CHIPTool Android APK (successful). Use the APK to open a multi-admin commissioning window. Attempt secondary commissioning using the CHIP Tool CLI. Observe otbr-agent behavior and log output. Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hi Luis, 1) I’ve tried using a baud rate of "1000000," but I’m still encountering a framing error during communication. I’ve tested with both UART_DRIVER and SERIAL_MGR. Between the two, which would you recommend as the more reliable and preferred option? To debug further, I enabled logs and checked the USART FIFO Overflow Register values. I noticed that the RXERR bit is being set in FIFOSTAT. For reference, USART0 is clocked at 32 MHz (sourced from XTAL), and the main clock is running at 48 MHz. BR, Vikash Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hello Vikash The baud rate will depend on the one the host stablish.  Just as an advice maybe you could try "1000000"; as for reference that baud rate is the default in an example for K32W. The Software flow control is supported in JN5189 using USART0 and USART1, however the Hardware flow control is more reliable and doesn’t interfere with data, The decision would be up to every customer. Described in Chapter 23.6.5.2 UM11138 Best Regards Luis Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hi Luis, Thanks for your response. I've tested the setup using a Raspberry Pi 4B with an nRF52840 DK and didn't encounter any RCP TX timeouts or resets in that configuration. This leads me to believe the issue is likely related to the RCP image or UART configuration on the JN5189. In my final hardware setup, RTS/CTS hardware flow control is not supported, so I'm limited to UART without flow control. Given this constraint: 1) What is the recommended UART baud rate for the JN5189 RCP when hardware flow control is not available? 2) Are there any buffer sizes, timing parameters, or driver-level settings that should be adjusted to reduce the risk of data loss? 3) Is software flow control (XON/XOFF) supported or recommended in this scenario? Best Regards Vikash Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hello, The UART clock impact timing accuracy, if the UART clock is unstable, it can cause loss of synchronization between the host and RCP. Match baud rates carefully between devices and test for tolerance margins, you could try a lower baud rate. Or as other option; Instead of using the FRO32K, you could switch to the XTAL32K oscillator, which offers better clock frequency accuracy; You can find more information about it in the User Manual [ UM11138] Chapter 4.4.4 UM11138 Best Regards Luis Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hello, Thanks for your reply. I have a few questions and observations: Does the UART clock source significantly impact timing accuracy and data sampling? Currently, the system is configured to use FRO32K as the clock source. Observation: When testing communication with the host: At 1 Mbps, I get around 3/10 successful attempts. At 115200, communication rarely succeeds. It seems the issue might be related to imprecise UART baud rate generation due to using a low-frequency (32.768 kHz) clock. Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hello, Sorry for the late response, The JN5189 supports Hardware Flow control in the USART0, you can find more information about it in the User Manual [ UM11138] Chapter 23.6.5.1  UM11138 The baud rate will depend on the one the host stablish. Best Regards Luis Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hi Luis, I've reviewed the logs from both ends and noticed instances of data corruption or loss occurring on the RCP side. Could you please suggest the ideal UART baud rate for the JN5189 in this specific case? Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hi Luis, Thank you for your feedback and for sharing the reference link. We've already placed an order for the i.MX8M platform and are currently waiting for it to arrive. In the meantime, I would like to continue debugging using the existing JN5189 setup. As part of that, I wanted to confirm whether the JN5189 supports hardware flow control on the UART interface. This will help us assess the communication stability while isolating the issue. Thanks Vikash Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hello, I review the file nxp_vendor_hook.cpp; This file is destined for both JN5189 and K32W061. Just for testing purposes, I will recommend you use an i.MX8M and try to isolate the issue to the root cause. This following link redirect to examples running Open Thread Border Router with i.MX for consulting How to setup OpenThread Border Router and Openther Deamon on the target Best Regards Luis Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hi Luis, Thank you for your prompt response. I’ve tested the setup on the following two platforms and encountered the same issue on both: i) Laptop (Ubuntu) ii) Router (OpenWRT) 1) From my observations during the commissioning process, the Thread end device sends a rapid sequence of messages to the chip-tool commissioner in response to a request. This quick burst of traffic may be causing the RCP to drop some packets, which the OTBR is likely expecting and waiting for2). 2) For the external commissioning, I believe the main constraint is the PSKd, which is why I’ve raised the concern with the Thread group and am currently awaiting their response. 3) Could you also take a look at the following issue? There is an nxp_vendor_hook.cpp file used when building for the K32W061 platform. I'm wondering whether a similar file exists for the JN5189 platform or if it's possible to reuse the existing nxp_vendor_hook.cpp for JN5189 by enabling the DOT_NCP_VENDOR_HOOK_SOURCE macro during compilation. Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response Hello, Have you tested running OTBR with an MCU/MPU instead of a computer? as the examples and guidelines that NXP support are destined for different Host's testings and have more information about it. The compilation for the K32W061 could apply to the JN5189, both are very similar. Also, could you take a look in External Commissioning  |  OpenThread if this apply to your additional commissioning issue? Best Regards Luis Re: OTBR Agent Timeout with JN5189 RCP During Commissioning in Multi-Admin Mode Due to No Response There is an nxp_vendor_hook.cpp file, which is used when compiling for the K32W061 platform. Do we have similar file for JN5189 platform, or Can we reuse it for the JN5189 by including/enabling the DOT_NCP_VENDOR_HOOK_SOURCE Macro during Compilation? ?
View full article