This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ25713B: I2C read BQ25713 ADC register Values are not correct

Part Number: BQ25713B
Other Parts Discussed in Thread: BQ25713,

hello!

when I readback BQ25713 ADC register Values are not correct, all of the register(VBAT, VSYS, ICHG, IDCHG, IIN, PSYS, VBUS, CMPIN) values are not correct.

2 cells Li-ion battery; adapter input voltege:5V3A; 

Register setting value:

Charge Option 0 170E
Charge Current Register 0400
Charge Voltage Register 20D0
Minimum System Voltage 1900
Prochot Status Register 4000
Charge Option 1 9201
Charge Option 2 417F
Charge Option 3 0010
Prochot Option 0 4C37
Prochot Option 1 8001
ADC Option E07F

others register is setted default;

This read back values after setting

Measure the input voltage =5V;Measure the input current  =1920mA;

Measure the battery voltage =8.3V;

the code :

void set_bq25713_main_reg(void)
{
uint8_t device_ID;
//read ID
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( DeviceID_ADDR);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
device_ID = I2C_read_nack();
if((device_ID == IC_BQ25713B)||(device_ID == IC_BQ25713))
{
rt_kprintf("\r\nCommunication success with bq25713");
}
else
{
rt_kprintf("\r\nCommunication failed with bq25713");
}
//ChargeOption0
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption0_LSB);
I2C_write( 0x0E);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption0_MSB);
I2C_write( 0x17);
I2C_stop();
board_func_DelayUs(50000);

//ChargeOption1
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption1_LSB);
I2C_write( 0x01);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption1_MSB);
I2C_write( 0x92);
I2C_stop();
board_func_DelayUs(50000);
//ChargeOption2
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption2_LSB);
I2C_write( 0x7F);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption2_MSB);
I2C_write( 0x41);
I2C_stop();
board_func_DelayUs(50000);
//ChargeOption3
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption3_LSB);
I2C_write( 0x10);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption3_MSB);
I2C_write( 0x00);
I2C_stop();
board_func_DelayUs(50000);

//ProchotOption0
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption0_LSB);
I2C_write( 0x37);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption0_MSB);
I2C_write( 0x4C);
I2C_stop();
board_func_DelayUs(50000);
//ProchotOption1
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption1_LSB);
I2C_write( 0x01);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption1_MSB);
I2C_write( 0x80);
I2C_stop();
board_func_DelayUs(50000);

//ChargerStatus
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargerStatus_LSB);
I2C_write( 0x00);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargerStatus_MSB);
I2C_write( 0x00);
I2C_stop();
board_func_DelayUs(50000);
//ProchotStatus
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotStatus_LSB);
I2C_write( 0x00);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotStatus_MSB);
I2C_write( 0x40);
I2C_stop();
board_func_DelayUs(50000);
//MinSystemVoltage
// I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
// I2C_write( MinSystemVoltage_LSB);
// I2C_write( 0x00);
// I2C_stop();
// board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( MinSystemVoltage_MSB);
I2C_write( 0x19);
I2C_stop();
board_func_DelayUs(50000);

//ChargeCurrent
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeCurrent_LSB);
I2C_write( 0x00);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeCurrent_MSB);
I2C_write( 0x04);
I2C_stop();
board_func_DelayUs(50000);

//ADCOption
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCOption_LSB);
I2C_write( 0x7F);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCOption_MSB);
I2C_write( 0xA0);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCOption_LSB);
I2C_write( 0x7F);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCOption_MSB);
I2C_write( 0xE0);
I2C_stop();
board_func_DelayUs(50000);
}

void read_bq25713_main_reg(void)
{
// uint8_t device_ID;
uint8_t charge_opt0_H,charge_opt1_H,charge_opt2_H,charge_opt3_H;
uint8_t charge_opt0_L,charge_opt1_L,charge_opt2_L,charge_opt3_L;
uint8_t prochot_opt0_H,prochot_opt0_L;
uint8_t prochot_opt1_H,prochot_opt1_L;
uint8_t charge_current_H,charge_current_L;
uint8_t max_charge_volt_H,max_charge_volt_L;
uint8_t min_sys_volt;
uint8_t in_current;
uint8_t temp_LSB,temp_MSB;

//¶ÁCharge Option 0 ¼Ä´æÆ÷
I2C_start(SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write(ChargeOption0_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start(SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt0_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption0_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt0_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ChargeOption0 = 0x%X",(uint16_t)(charge_opt0_H)<<8 | charge_opt0_L);
//¶ÁCharge Option 1 ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption1_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt1_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption1_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt1_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ChargeOption1 = 0x%X",(uint16_t)(charge_opt1_H)<<8 | charge_opt1_L);
//¶ÁCharge Option 2 ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption2_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt2_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption2_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt2_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ChargeOption2 = 0x%X",(uint16_t)(charge_opt2_H)<<8 | charge_opt2_L);
//¶ÁCharge Option 3 ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption3_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt3_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargeOption3_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_opt3_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ChargeOption3 = 0x%X",(uint16_t)(charge_opt3_H)<<8 | charge_opt3_L);
//¶ÁMax Charge Voltage ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( MaxChargeVoltage_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
max_charge_volt_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( MaxChargeVoltage_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
max_charge_volt_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n MaxChargeVoltage = %dmV",(uint16_t)(max_charge_volt_H)<<8 | max_charge_volt_L);
//¶ÁProchot Option 0 ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption0_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
prochot_opt0_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption0_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
prochot_opt0_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ProchotOption0 = 0x%X",(uint16_t)(prochot_opt0_H)<<8 | prochot_opt0_L);
//¶ÁProchot Option 1 ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption1_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
prochot_opt1_L = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotOption1_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
prochot_opt1_H = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ProchotOption1 = 0x%X",(uint16_t)(prochot_opt1_H)<<8 | prochot_opt1_L);
//¶Á ADCOption ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCOption_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCOption_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ADCOption = 0x%X",(uint16_t)(temp_MSB)<<8 | temp_LSB);
//¶Á ChargerStatus ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargerStatus_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ChargerStatus_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ChargerStatus = 0x%X",(uint16_t)(temp_MSB)<<8 | temp_LSB);
//¶Á ProchotStatus ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotStatus_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ProchotStatus_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ProchotStatus = 0x%X",(uint16_t)(temp_MSB)<<8 | temp_LSB);
//¶Á IN_DPM(Input current limit in use) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( IN_DPM_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( IN_DPM_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n IN_DPM = %dmA",(uint16_t)(temp_MSB)*50);
//¶Á InputVoltage(Input Voltege) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( InputVoltage_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( InputVoltage_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n InputVoltage = %dmV",(((uint16_t)(temp_MSB)<<8) | temp_LSB));
//¶Á MinSystemVoltage(Minimum system voltege) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( MinSystemVoltage_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( MinSystemVoltage_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n MinSystemVoltage = %dmV",(uint16_t)(temp_MSB<<8) | temp_LSB);
//¶Á IIN_HOST(Input current limit set by host) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( IIN_HOST_LSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( IIN_HOST_MSB);
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n IIN_HOST = %dmA",(uint16_t)(temp_MSB)*50);

//Read ADC Order:VBAT, VSYS, ICHG, IDCHG, IIN, PSYS, VBUS, CMPIN.
//¶Á ADCVSYSVBAT(System Voltege and battery voltege) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCVSYSVBAT_LSB); //VBAT
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCVSYSVBAT_MSB); //VSYS
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ADCVSYSVBAT = %dmV,%dmV",(uint16_t)(temp_MSB)<<6, (uint16_t)(temp_LSB)<<6);
//¶Á ADCIBAT(Charge Current) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCIBAT_MSB); // ICHG
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_current_H = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCIBAT_LSB); //IDCHG
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
charge_current_L = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ADCIBAT = ichg:%dmA,idchg:%dmA",(uint16_t)(charge_current_H)<<6,(uint16_t)(charge_current_L)<<8);
//¶Á ADCIINCMPIN(Input Current and cmpin voltage) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCIINCMPIN_MSB); //IIN
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ADCIIN = %dmA",(uint16_t)temp_LSB*50);
//¶Á ADCVBUS_PSYS(Input Voltege and system power) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCVBUS_PSYS_LSB); //PSYS
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCVBUS_PSYS_MSB); //VBUS
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_MSB = I2C_read_nack();
board_func_DelayUs(50000);
rt_kprintf("\r\n ADCVBUS_PSYS = %dmV_%dmV",(uint16_t)(temp_MSB)<<6,(uint16_t)(temp_LSB)*12);
//¶Á ADC CMPIN(cmpin voltage) ¼Ä´æÆ÷
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Transmitter);
I2C_write( ADCIINCMPIN_LSB); //CMPIN
I2C_stop();
board_func_DelayUs(50000);
I2C_start( SLAVE_ADDRESS<<1, I2C_Direction_Receiver);
temp_LSB = I2C_read_nack();
rt_kprintf("\r\n ADC CMPIN = %dmV",(uint16_t)temp_LSB*12);

rt_kprintf("\r\n");
}

so, I don't know What's the problem!

can you help me? thanks!

e-meil:527419127@qq.com