pic32
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| pic32 [2026-11-22 10:42 UTC (6 days ago)] – doof | pic32 [2026-11-23 05:23 UTC (5 days ago)] (current) – 07ef usb service port enable doof | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== PIC32 ====== | ====== PIC32 ====== | ||
| - | - the pic32 programming connector (labeled PIC32) matches the PICkit pinout exactly | + | The PIC32 is a PIC32MX795F512L. The programming connector (labeled PIC32) matches the PICkit pinout exactly - Readback |
| - | - readback | + | |
| - | ===== iMX to PIC comms ===== | + | The firmware strings come from keys '' |
| - | The watchdog communicates on /dev/ttymxc2 at 115200 8n1 | + | < |
| + | PROXmobil3 PIC32 / PM3-P32 | ||
| + | PROXmobil3-Bootloader | ||
| + | </ | ||
| - | Watchdog initialization | + | IPP reads and writes value keys, reads the EEPROMs, sets the watchdog, and reports the sensors. It has no memory-read command, and no PIC32 image ships on the host. |
| - | Stopping the watchdog (with NxExe watchdog 0): {{ :euthasol.sal |}} | + | ===== i.MX to PIC comms ===== |
| - | Stopping | + | The PIC32 talks IPP on '' |
| + | The framing is the same as [[cvend|cVEND]]. | ||
| - | echo -ne " | + | ===== IPP message types ===== |
| - | Communication uses the same IPP protocol as [[cVEND]]. | + | -> - i.MX to PIC\\ |
| + | <- - PIC to i.MX | ||
| - | ==== IPP message types ==== | ||
| ^ msgType ^ dir ^ name ^ description ^ | ^ msgType ^ dir ^ name ^ description ^ | ||
| Line 26: | Line 29: | ||
| | 0x04 | -> | ValueWrite | accepts a 2-byte key followed by a variable-length value, assigns value to key | | | 0x04 | -> | ValueWrite | accepts a 2-byte key followed by a variable-length value, assigns value to key | | ||
| | 0x05 | <- | ValueWriteReply | | | | 0x05 | <- | ValueWriteReply | | | ||
| - | | 0x0a | -> | | '' | + | | 0x0a | -> | | '' |
| | 0x0c | -> | | empty payload immediately powers the device off | | | 0x0c | -> | | empty payload immediately powers the device off | | ||
| | 0x0e | -> | | empty payload immediately powers the device off | | | 0x0e | -> | | empty payload immediately powers the device off | | ||
| - | | 0x12 | -> | SetLogLevel | '' | + | | 0x12 | -> | SetLogLevel | '' |
| - | + | ||
| - | -> - iMX to PIC\\ | + | |
| - | <- - PIC to iMX | + | |
| Types 0x80-0xff mirror 0x00-0x7f, but with CRC32 enabled. | Types 0x80-0xff mirror 0x00-0x7f, but with CRC32 enabled. | ||
| - | [[nx]] strings also suggest | + | '' |
| - | * ValueAttribRead | + | |
| - | | + | '' |
| - | * DeviceRead (0x0a?) | + | |
| - | * DeviceWrite | + | ===== Keys ===== |
| - | * DeviceIoCtl | + | |
| - | * AppRequest | + | |
| - | ==== Keys ==== | + | Rows marked unconfirmed are measured readings; the meaning is a guess. |
| ^ id ^ type ^ description ^ | ^ id ^ type ^ description ^ | ||
| Line 86: | Line 84: | ||
| | 07de | u8 | | | | 07de | u8 | | | ||
| | 07df | u8 | | | | 07df | u8 | | | ||
| - | | 07e0 | u8 | | | + | | 07e0 | u8 | audio power-amp enable: 1 = on, 0 = off | |
| | 07e1 | u8 | | | | 07e1 | u8 | | | ||
| | 07e2 | u8 | | | | 07e2 | u8 | | | ||
| Line 101: | Line 99: | ||
| | 07ed | u8 | | | | 07ed | u8 | | | ||
| | 07ee | u8 | | | | 07ee | u8 | | | ||
| - | | 07ef | u8 | | | + | | 07ef | u8 | usb service port enable (0/1) | |
| | 07f0 | u8 | | | | 07f0 | u8 | | | ||
| | 07f1 | u8 | | | | 07f1 | u8 | | | ||
| Line 109: | Line 107: | ||
| | 07f5 | u8 | | | | 07f5 | u8 | | | ||
| | 07f6 | u8 | | | | 07f6 | u8 | | | ||
| - | | 4000 | u16 | PIC32 version (major, minor), | + | | 4000 | u16 | PIC32 version; 0.20 reads as 20 (cf. 0xc000) | |
| - | | 4001 | u16 | PIC32 bootloader version (major, minor), | + | | 4001 | u16 | bootloader version; 1.1 reads as 101 (cf. 0xc001) | |
| | 4002 | u16 | watchdog residual (seconds) | | | 4002 | u16 | watchdog residual (seconds) | | ||
| - | | 4003 | u16 | watchdog timeout | + | | 4003 | u16 | watchdog timeout seconds, 0 disables |
| - | | 4004 | u16 | boot watchdog timeout | + | | 4004 | u16 | boot watchdog timeout seconds | |
| | 4005 | u16 | | | | 4005 | u16 | | | ||
| | 400a | u16 | | | | 400a | u16 | | | ||
| Line 123: | Line 121: | ||
| | 4010 | u16 | | | | 4010 | u16 | | | ||
| | 4011 | u16 | | | | 4011 | u16 | | | ||
| - | | 4030 | u16 | | | + | | 4030 | u16 | backlight brightness at ambient 0, 0..10000 |
| - | | 4031 | u16 | | | + | | 4031 | u16 | backlight brightness at ambient 10000, 0..10000 |
| - | | 4032 | u16 | | | + | | 4032 | u16 | second brightness pair, likely idle at ambient 0 (reads 200; unconfirmed) |
| - | | 4033 | u16 | | | + | | 4033 | u16 | second brightness pair, likely idle at ambient 10000 (reads 2400; unconfirmed) |
| - | | 4034 | u16 | | | + | | 4034 | u16 | reads 65535; purpose unknown |
| - | | 4035 | u16 | | | + | | 4035 | u16 | reads 150; purpose unknown |
| - | | 4036 | u16 | | | + | | 4036 | u16 | reads 1500; purpose unknown |
| - | | 403d | u16 | | | + | | 403d | u16 | reads 314; maybe 31.4 °C (unconfirmed) |
| - | | 403e | u16 | | | + | | 403e | u16 | reads 65472, or -64 signed (unconfirmed) |
| - | | 403f | u16 | | | + | | 403f | u16 | reads 314; maybe 31.4 °C (unconfirmed) |
| | 5000 | u16 | | | | 5000 | u16 | | | ||
| | 5001 | u16 | | | | 5001 | u16 | | | ||
| - | | 5002 | u16 | | | + | | 5002 | u16 | reads 1; purpose unknown |
| - | | 5008 | u16 | | | + | | 5008 | u16 | reads about 32400; purpose unknown |
| - | | 500b | u16 | ambient light sensor | + | | 500b | u16 | ambient light, 0..10000 |
| - | | 5013 | u16 | | | + | | 5013 | u16 | reads 0; purpose unknown |
| | 5040 | u16 | input voltage (mV) | | | 5040 | u16 | input voltage (mV) | | ||
| - | | 5041 | u16 | | | + | | 5041 | u16 | rail, about 3.2 V | |
| - | | 5042 | u16 | | | + | | 5042 | u16 | rail, about 24.9 V | |
| - | | 5043 | u16 | | | + | | 5043 | u16 | rail, about 24.9 V | |
| - | | 5044 | u16 | | | + | | 5044 | u16 | rail, about 23.0 V | |
| - | | 504b | u16 | | | + | | 504b | u16 | rail, about 1.28 V (unconfirmed) |
| - | | 504c | u16 | | | + | | 504c | u16 | 3V9 rail, about 4.04 V | |
| - | | 504e | u16 | | | + | | 504e | u16 | rail, about 5.02 V (unconfirmed) |
| - | | 504f | u16 | | | + | | 504f | u16 | 3V3 rail, about 3.27 V | |
| - | | 5050 | u16 | | | + | | 5050 | u16 | 5V rail, about 5.06 V | |
| | 5100 | u16 | | | | 5100 | u16 | | | ||
| | 5101 | u16 | | | | 5101 | u16 | | | ||
| Line 260: | Line 258: | ||
| | d250 | string | | | | d250 | string | | | ||
| + | ===== EEPROM ===== | ||
| + | |||
| + | The PIC32 is the path to both EEPROMs. The frames use sequence 1; bump it between frames. | ||
| + | |||
| + | < | ||
| + | stty -F / | ||
| + | |||
| + | # external EEPROM, mounting plate or dongle | ||
| + | printf ' | ||
| + | |||
| + | # internal EEPROM, device identity | ||
| + | printf ' | ||
| + | |||
| + | # read the reply | ||
| + | timeout -t 2 dd if=/ | ||
| + | </ | ||
| + | |||
| + | The reply is type '' | ||
| + | |||
| + | ===== Watchdog and power ===== | ||
| + | |||
| + | Two watchdogs run: the external PIC32 one at about 60 seconds, fed by nx, and the i.MX6 '' | ||
| + | |||
| + | < | ||
| + | NxExe watchdog 0 | ||
| + | </ | ||
| + | |||
| + | or send the ValueWrite directly: | ||
| + | |||
| + | < | ||
| + | printf ' | ||
| + | </ | ||
| + | |||
| + | When the PIC32 watchdog expires, the unit power-cycles and comes back. IPP '' | ||
| + | |||
| + | ===== Backlight ===== | ||
| + | |||
| + | The PIC32 owns the panel backlight. '' | ||
| + | |||
| + | On the units seen, the pair comes up at 200/12000 and nx sets 100/15000 at startup. The presets in '' | ||
| + | |||
| + | ===== Audio amp ===== | ||
| + | |||
| + | The external speaker amp is key '' | ||
| + | |||
| + | < | ||
| + | stty -F / | ||
| + | |||
| + | # on | ||
| + | printf ' | ||
| + | |||
| + | # off | ||
| + | printf ' | ||
| + | |||
| + | # read | ||
| + | printf ' | ||
| + | timeout -t 2 dd if=/ | ||
| + | </ | ||
| + | |||
| + | It is a hard latch until the PIC32 resets; it reads back, so query it instead of toggling blind. See [[alsa]]. | ||
| + | |||
| + | ===== Sensors and clock ===== | ||
| + | |||
| + | On I2C bus 2 there is the PFUZE100 PMIC at '' | ||
| + | |||
| + | < | ||
| + | cat / | ||
| + | </ | ||
| + | |||
| + | That is milli-degrees Celsius. The driver owns the bus, so use hwmon rather than '' | ||
| + | |||
| + | The host clock comes from '' | ||
pic32.1795344154.txt.gz · Last modified: by doof
