LimeNET-Micro Fan Control? - Solved

I have a LimeNet-Micro V2.1 board with a fan connected to J8. The board is now generating a DVB-S2 TV signal using the Portsdown software on Raspbian Stretch (fully LimeNet Micro compatible code coming to GitHub soon).

I understand that by default the fan is controlled by a sensor of the FPGA temperature but, as my application is processor-intensive, I would like to run the fan all the time to cool the CM3 module.

Is there a LimeSuite C call that I can make to control the fan from my application?

Thanks, Dave

Hi @DaveG8GKQ,

To be precise, fan is controlled by on-board temperature sensor by default.

This is the function:

LMS_WriteFPGAReg(lms_device_t *device, uint32_t address, uint16_t val);

Use this sequence to turn fan on:

LMS_WriteFPGAReg(DEVICE, 0xCC, 0x01);  // Enable manual fan control
LMS_WriteFPGAReg(DEVICE, 0xCD, 0x01);  // Turn fan on

Thanks @Zack

That works perfectly. Now set to come on while transmitting and then set back to auto during standby.

Dave

Hi Zack,

Is there any command to read the Board Temperature of a LimeSDR USB?

Thanks

Hi @mauro,

Yes, there is a function for this:

API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam ( lms_device_t * device ,
uint8_t id ,
float_type * val ,
lms_name_t units
)

Pass BOARD_PARAM_TEMP for id, NULL for units. Pass pointer to floating value as val where you want temperature to be read.

Thanks for the answer!

It wasn’t working with units=NULL, but it worked when I passed a variable for the units variable:

Blockquote
float_type temp;
lms_name_t units;
LMS_ReadCustomBoardParam (pdevice,BOARD_PARAM_TEMP,&temp,units);