Browse Source

优化myRadio_init中的初始化

dropLin 11 months ago
parent
commit
9289661b55
7 changed files with 15 additions and 7 deletions
  1. 4 0
      README.md
  2. 2 2
      keil_v5/project.uvoptx
  3. 2 2
      keil_v5/project.uvprojx
  4. 1 1
      project/main.c
  5. 1 1
      radio/myRadio.c
  6. 0 1
      radio/radio.c
  7. 5 0
      radio/sx126x.c

+ 4 - 0
README.md

@@ -350,6 +350,10 @@ RadioEvents.RxError = OnRxError;
     2024年6月21日
     - 增加信噪比显示
 
+- V14
+    2024年6月25日
+    - 优化myRadio_init中的初始化
+
 ## 免责说明
 1、本工程驱动软件只提供做演示项目使用,未经过大批量项目验证,客户需谨慎使用,如果使用在正式项目中引发的所有问题,本司概不负责。使用过程若发现任何问题,可及时与本司相关人员联系。
 2、本工程所有文件可以用于商业性项目移植,无需向本司申请。

+ 2 - 2
keil_v5/project.uvoptx

@@ -388,7 +388,7 @@
       <OPTFL>
         <tvExp>1</tvExp>
         <tvExpOptDlg>0</tvExpOptDlg>
-        <IsCurrentTarget>1</IsCurrentTarget>
+        <IsCurrentTarget>0</IsCurrentTarget>
       </OPTFL>
       <CpuCode>18</CpuCode>
       <DebugOpt>
@@ -573,7 +573,7 @@
       <OPTFL>
         <tvExp>1</tvExp>
         <tvExpOptDlg>0</tvExpOptDlg>
-        <IsCurrentTarget>0</IsCurrentTarget>
+        <IsCurrentTarget>1</IsCurrentTarget>
       </OPTFL>
       <CpuCode>255</CpuCode>
       <DebugOpt>

+ 2 - 2
keil_v5/project.uvprojx

@@ -1350,7 +1350,7 @@
             <InvalidFlash>1</InvalidFlash>
           </TargetStatus>
           <OutputDirectory>.\Objects\</OutputDirectory>
-          <OutputName>VGKitBoard_237xS_ST_APP_V13</OutputName>
+          <OutputName>VGKitBoard_237xS_ST_APP_V14</OutputName>
           <CreateExecutable>1</CreateExecutable>
           <CreateLib>0</CreateLib>
           <CreateHexFile>1</CreateHexFile>
@@ -2000,7 +2000,7 @@
             <InvalidFlash>1</InvalidFlash>
           </TargetStatus>
           <OutputDirectory>.\Objects\</OutputDirectory>
-          <OutputName>VGKitBoard_237xS_AT_APP_V13</OutputName>
+          <OutputName>VGKitBoard_237xS_AT_APP_V14</OutputName>
           <CreateExecutable>1</CreateExecutable>
           <CreateLib>0</CreateLib>
           <CreateHexFile>1</CreateHexFile>

+ 1 - 1
project/main.c

@@ -15,7 +15,7 @@
 #include "myUart3.h"
 #include "myRadio.h"
 
-#define SOFT_VERSION 0x13
+#define SOFT_VERSION 0x14
 #define SET_RF_FREQ_HZ(base, ch,step) base+ch*step*10*1000
 //---------------key
 KeyParamExt_ts *getKeyReturn;

+ 1 - 1
radio/myRadio.c

@@ -225,7 +225,7 @@ void myRadio_init(int agr0, void *agr1_ptr)
         SX126xEnableTxco(true);
     }
     Radio.Init( &RadioEvents );
-    Radio.SetChannel( RF_FREQUENCY );
+    // Radio.SetChannel( RF_FREQUENCY );    //此处屏蔽,由外部设置,myRadio_init之后再单独设置频率
 // #if defined( USE_MODEM_LORA )
     if (getLoRaSta())
     {

+ 0 - 1
radio/radio.c

@@ -512,7 +512,6 @@ void RadioInit( RadioEvents_t *events )
     //Initialize driver timeout timers
     //TimerInit( &TxTimeoutTimer, RadioOnTxTimeoutIrq );
     //TimerInit( &RxTimeoutTimer, RadioOnRxTimeoutIrq );
-    
     IrqFired = false;
 }
 

+ 5 - 0
radio/sx126x.c

@@ -369,6 +369,11 @@ void SX126xCalibrateImage( uint32_t freq )
         calFreq[0] = 0x6B;
         calFreq[1] = 0x6F;
     }
+    else
+    {
+        calFreq[0] = 0x6B;
+        calFreq[1] = 0x6F;
+    }
     SX126xWriteCommand( RADIO_CALIBRATEIMAGE, calFreq, 2 );
 }