pic32
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| pic32 [2026-03-04 21:16 UTC (9 months ago)] – exhaustive ValueRead scan 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 '' |
| - | Watchdog initialization and feeding: {{ :kibble.sal |}} | + | < |
| + | PROXmobil3 PIC32 / PM3-P32 | ||
| + | PROXmobil3-Bootloader / PM3-BL | ||
| + | </ | ||
| - | Stopping | + | 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 is as simple as | + | ===== i.MX to PIC comms ===== |
| + | The PIC32 talks IPP on '' | ||
| - | echo -ne " | + | The framing is the same as [[cvend|cVEND]]. |
| - | Communication uses the same IPP protocol as [[cVEND]]. | + | ===== IPP message types ===== |
| + | |||
| + | -> - i.MX to PIC\\ | ||
| + | <- - PIC to i.MX | ||
| - | ==== IPP message types ==== | ||
| ^ msgType ^ dir ^ name ^ description ^ | ^ msgType ^ dir ^ name ^ description ^ | ||
| Line 24: | 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 51: | Line 51: | ||
| | 0004 | u8 | | | | 0004 | u8 | | | ||
| | 000a | u8 | | | | 000a | u8 | | | ||
| - | | 0100 | u8 | | | + | | 0100 | u8 | internal power button (0/1) | |
| | 03e8 | u8 | | | | 03e8 | u8 | | | ||
| | 03e9 | u8 | | | | 03e9 | u8 | | | ||
| Line 72: | Line 72: | ||
| | 07d2 | u8 | | | | 07d2 | u8 | | | ||
| | 07d3 | u8 | | | | 07d3 | u8 | | | ||
| - | | 07d4 | u8 | | | + | | 07d4 | u8 | barcode power (0/1) | |
| | 07d5 | u8 | | | | 07d5 | u8 | | | ||
| | 07d6 | u8 | | | | 07d6 | u8 | | | ||
| | 07d7 | u8 | | | | 07d7 | u8 | | | ||
| - | | 07d8 | u8 | | | + | | 07d8 | u8 | screen/ |
| - | | 07d9 | u8 | | | + | | 07d9 | u8 | cVEND power (0/1) | |
| | 07da | u8 | | | | 07da | u8 | | | ||
| - | | 07db | u8 | | | + | | 07db | u8 | 3v9 rail power (0/1) | |
| | 07dc | u8 | | | | 07dc | u8 | | | ||
| | 07dd | u8 | | | | 07dd | u8 | | | ||
| | 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 99: | 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 107: | Line 107: | ||
| | 07f5 | u8 | | | | 07f5 | u8 | | | ||
| | 07f6 | u8 | | | | 07f6 | u8 | | | ||
| - | | 4000 | u16 | | | + | | 4000 | u16 | PIC32 version; 0.20 reads as 20 (cf. 0xc000) |
| - | | 4001 | u16 | | | + | | 4001 | u16 | bootloader version; 1.1 reads as 101 (cf. 0xc001) |
| - | | 4002 | u16 | | | + | | 4002 | u16 | watchdog residual (seconds) |
| - | | 4003 | u16 | watchdog timeout | + | | 4003 | u16 | watchdog timeout seconds, 0 disables |
| - | | 4004 | u16 | | | + | | 4004 | u16 | boot watchdog timeout seconds |
| | 4005 | u16 | | | | 4005 | u16 | | | ||
| | 400a | u16 | | | | 400a | u16 | | | ||
| Line 121: | 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 185: | Line 185: | ||
| | 8020 | u32 | | | | 8020 | u32 | | | ||
| | 8030 | u32 | | | | 8030 | u32 | | | ||
| - | | 8100 | u32 | | | + | | 8100 | u32 | PwrOnTime |
| - | | 8102 | u32 | | | + | | 8102 | u32 | PwrOnCnt |
| - | | 8103 | u32 | | | + | | 8103 | u32 | StartCnt |
| - | | 8104 | u32 | | | + | | 8104 | u32 | StartIgnCnt |
| | 8105 | u32 | | | | 8105 | u32 | | | ||
| | 8106 | u32 | | | | 8106 | u32 | | | ||
| - | | 8107 | u32 | | | + | | 8107 | u32 | StartButtonCnt |
| - | | 8108 | u32 | | | + | | 8108 | u32 | StartUsbCnt |
| - | | 8109 | u32 | | | + | | 8109 | u32 | UsbConnectCnt |
| - | | 810a | u32 | | | + | | 810a | u32 | ShutdownCnt |
| - | | 8110 | u32 | | | + | | 8110 | u32 | WdCnt | |
| - | | 8111 | u32 | | | + | | 8111 | u32 | WdCpuCnt |
| - | | 8112 | u32 | | | + | | 8112 | u32 | WdCardCnt |
| | 8114 | u32 | | | | 8114 | u32 | | | ||
| - | | 8115 | u32 | | | + | | 8115 | u32 | WdButtonCnt |
| | 8116 | u32 | | | | 8116 | u32 | | | ||
| | 8117 | u32 | | | | 8117 | u32 | | | ||
| Line 258: | 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.1772658967.txt.gz · Last modified: by doof
