PocketBeagle 2 - MSPM0 not returning Temperature

Hi,

When I cat in_temp0_scale I get the scaler of 250 but when I cat in_temp0_raw it returns 0. Is there some init process required to return the temperature reading? I’ve checked for using the AD7271 ADC Linux driver and I’ve not found any…

Regards, Mike.

Adding @ayush1325 , the mspm0 is fully programmable by the end user.

are there instructions on how to load the program from the SOC to the mspm0 ?

I have the LP-MSPM0C1104 and I don’t know if that is the same as what is used with that board. However, it takes CCS20 and a usb cable to program it, how is that chip placed, is it external to the SoC or or inside? Most of this is too tightly integrated with sysconfig so without that file, original .sysconfg that was used for board bring up you might just be confined to what ever it is pre-configured for.

Hi,
I was not looking to re-program it - only to talk to it and receive values from it.

If you look at the source for the emulation: source/modules/emulation/ad7291_emulation.h · main · PocketBeagle / MSPM0-ADC-EEPROM · GitLab

it specifically states that the temperature sensor is not implemented.

1 Like

@foxsquirrel
the MSPM0 is the ‘L’ version, it is located external to the SOC
looks like it will use I2C for programming.
there are documents in TIs site, but i was hoping not having to reinvent the wheel
the I2C address is 0x48, but i have yet to see any register mapping of the device

doing:
cat /sys/class/firmware/mspm0l1105/status
idle
not sure if that means the mpu is not running or this is for programming

update:
the mspm0 is already programmed, reading AIN0 works, floating reads 1980 ish and 2 ish when grounded.

in_voltage#_raw at
/sys/bus/iio/devices/iio:device0
or
/sys/bus/i2c/drivers/ad7291/0-0020/iio:device0

It might take more than i2c to program it, the board I have is using the usb to xps110 debug probe chip to control the programming. Does the board have any exposed pads or connector for programming it.?

nope,
the mpsm0 contains a BSL and uses I2C or UART for programming. there are some reset llines, not sure how to use them. the link provided earlier seems to have an app that might do the programming when supplied a .hex.
being the AINx work, i’m not going to mess with it.

@ayush1325 wrote a kernel driver to ‘flash’ the mspm0 it’s included in the default image… Using FW_UPLOAD and friends…

2 Likes

Here are instructions to flash mspm0 firmware. I am only going to put the CLI instructions here, since well, they are probably much more relevant in case of mspm0

  1. Download bb-imager-rs latest version. Currently that is v0.0.3:
wget https://openbeagle.org/api/v4/projects/832/packages/generic/bb-imager-cli/0.0.3/bb-imager-cli-aarch64-unknown-linux-gnu.tar.xz
tar -xvf bb-imager-cli-aarch64-unknown-linux-gnu.tar.xz
cd usr/bin
  1. Download the firmware from here or well, just any Ti-TXT or iHex firmware should work.
  2. Flash:
./bb-imager-cli flash pb2 --img-local /path/to/firmware --no-eeprom
1 Like

Just keep in mind that if you flash the mspm0, the eeprom with serial number and everything is gone. The eeprom is emulated on the mspm0 so if you use a different firmware, that functionality is gone.

Ahh, so bb-imager-cli can actually preserve EEPROM contents. You just need to remove the --no-eeprom flag. I thought @amf99 was trying to flash a firmware without EEPROM emulation.

Note: it does require that you are going from an EEPROM firmware to another EEPROM firmware.

1 Like

I can also add an example to write contents to EEPROM if it seems helpful. I already have nice abstraction for EEPROM format.

1 Like