host-contract.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. {
  2. "axis_count": 3,
  3. "commands": {
  4. "get_motor_status": {
  5. "payload_length": 0,
  6. "response": "MOTOR_STATUS_DATA",
  7. "type": "0x03"
  8. },
  9. "get_temperature": {
  10. "payload_length": 0,
  11. "response": "TEMPERATURE_DATA",
  12. "type": "0x02"
  13. },
  14. "motor_status_data": {
  15. "frame_length": 37,
  16. "layout": {
  17. "axis_fields": [
  18. "state",
  19. "flags",
  20. "requested_percent",
  21. "current_position_le16",
  22. "target_position_le16",
  23. "travel_steps_le16",
  24. "fault_code"
  25. ],
  26. "axis_order": [
  27. "x",
  28. "y",
  29. "z"
  30. ],
  31. "byte0_global": {
  32. "bit0_2": "calibrated_mask_xyz",
  33. "bit3_5": "fault_mask_xyz",
  34. "bit6": "startup_complete",
  35. "bit7": "watchdog_tripped"
  36. },
  37. "fault_codes": {
  38. "BOTH_LIMITS_ACTIVE": 1,
  39. "CAL_CLOSE_TIMEOUT": 2,
  40. "CAL_OPEN_TIMEOUT": 3,
  41. "ENDPOINT_TIMEOUT": 5,
  42. "INVALID_ZERO_OR_TINY_TRAVEL": 4,
  43. "NONE": 0
  44. },
  45. "flags": {
  46. "calibrated": 2,
  47. "close_limit": 1,
  48. "endpoint_mode": 4,
  49. "moving": 3,
  50. "open_limit": 0,
  51. "replan_pending": 6,
  52. "reserved": 7,
  53. "target_valid": 5
  54. },
  55. "per_axis_bytes": 10,
  56. "states": {
  57. "CAL_MEASURE_OPEN": 1,
  58. "CAL_SEEK_CLOSE": 0,
  59. "FAULT": 6,
  60. "IDLE": 2,
  61. "MOVE_CLOSE": 4,
  62. "MOVE_OPEN": 3,
  63. "WAIT_REPLAN": 5
  64. }
  65. },
  66. "payload_length": 31,
  67. "type": "0x83"
  68. },
  69. "set_all": {
  70. "door_percent_range": [
  71. 0,
  72. 100
  73. ],
  74. "door_percent_semantics": {
  75. "0": "full_open_endpoint",
  76. "0x65": "rejected_out_of_range",
  77. "100": "full_close_endpoint",
  78. "1_to_99": "mid_percent_close",
  79. "all_zero_frame": "fan_ptc_zero_and_all_doors_full_open_not_heartbeat"
  80. },
  81. "duty_range": [
  82. 0,
  83. 100
  84. ],
  85. "field_order": [
  86. "fan_chamber_1",
  87. "fan_chamber_2",
  88. "fan_chamber_3",
  89. "fan_chamber_4",
  90. "ptc_chamber_1",
  91. "ptc_chamber_2",
  92. "ptc_chamber_3",
  93. "ptc_chamber_4",
  94. "door_z_percent",
  95. "door_x_percent",
  96. "door_y_percent"
  97. ],
  98. "payload_length": 11,
  99. "response": "none",
  100. "type": "0x01"
  101. },
  102. "temperature_data": {
  103. "frame_length": 33,
  104. "payload_length": 27,
  105. "type": "0x82"
  106. }
  107. },
  108. "limit_count": 6,
  109. "limits": {
  110. "active_level": "high",
  111. "channels": [
  112. {
  113. "ball": "A5",
  114. "connector": "CON12",
  115. "connector_pin": 1,
  116. "name": "x_limit_ls",
  117. "side": "low"
  118. },
  119. {
  120. "ball": "B6",
  121. "connector": "CON12",
  122. "connector_pin": 2,
  123. "name": "x_limit_hs",
  124. "side": "high"
  125. },
  126. {
  127. "ball": "C8",
  128. "connector": "CON12",
  129. "connector_pin": 3,
  130. "name": "y_limit_ls",
  131. "side": "low"
  132. },
  133. {
  134. "ball": "A8",
  135. "connector": "CON12",
  136. "connector_pin": 4,
  137. "name": "y_limit_hs",
  138. "side": "high"
  139. },
  140. {
  141. "ball": "K16",
  142. "connector": "CON129",
  143. "connector_pin": 1,
  144. "name": "z_limit_ls",
  145. "side": "low"
  146. },
  147. {
  148. "ball": "J15",
  149. "connector": "CON129",
  150. "connector_pin": 2,
  151. "name": "z_limit_hs",
  152. "side": "high"
  153. }
  154. ],
  155. "close_limit_is_ls": [
  156. true,
  157. true,
  158. true
  159. ],
  160. "functional_use": true,
  161. "limit_active_high": [
  162. true,
  163. true,
  164. true
  165. ],
  166. "limit_count": 6,
  167. "runtime_use": true,
  168. "startup": {
  169. "additional_rising_edges_after_synchronized_limit": 0,
  170. "axis_order": [
  171. "x",
  172. "y",
  173. "z"
  174. ],
  175. "enabled": true,
  176. "fault_lock_until_reset": true,
  177. "final_position": "open",
  178. "limit_stop_during_move": true,
  179. "max_steps": 5000,
  180. "min_travel_steps": 2,
  181. "mode": "seek_close_then_measure_open",
  182. "partial_axis_failure_allowed": true,
  183. "runtime_limit_use": true,
  184. "step_rate_hz": 1000,
  185. "stop_semantics": "truncate_current_high_pulse_immediately_after_synchronized_limit"
  186. }
  187. },
  188. "motors": {
  189. "close_dir_value": 1,
  190. "count": 3,
  191. "dir_close_level": [
  192. 1,
  193. 1,
  194. 1
  195. ],
  196. "dir_setup_cycles": 25000,
  197. "enable_n": {
  198. "active_level": "low",
  199. "ball": "C11",
  200. "connector": "CON120",
  201. "connector_pin": 2,
  202. "notes": "NPN open-collector invert at board; FPGA drives constant 1 so connector EN is permanently asserted.",
  203. "policy": "permanent_high"
  204. },
  205. "execution": "overlap",
  206. "mapping": {
  207. "x": {
  208. "axis": "x",
  209. "dir_ball": "J6",
  210. "dir_connector": "CON142",
  211. "dir_connector_pin": 3,
  212. "role": "door",
  213. "step_ball": "H4",
  214. "step_connector": "CON142",
  215. "step_connector_pin": 2
  216. },
  217. "y": {
  218. "axis": "y",
  219. "dir_ball": "A4",
  220. "dir_connector": "CON126",
  221. "dir_connector_pin": 3,
  222. "role": "door",
  223. "step_ball": "E7",
  224. "step_connector": "CON126",
  225. "step_connector_pin": 2
  226. },
  227. "z": {
  228. "axis": "z",
  229. "dir_ball": "A12",
  230. "dir_connector": "CON127",
  231. "dir_connector_pin": 3,
  232. "role": "door",
  233. "step_ball": "B4",
  234. "step_connector": "CON127",
  235. "step_connector_pin": 2
  236. }
  237. },
  238. "open_dir_value": 0,
  239. "order": [
  240. "x",
  241. "y",
  242. "z"
  243. ],
  244. "positioning": {
  245. "close_endpoint_percent": 100,
  246. "command_interrupt": "finish_current_high_pulse_then_replan",
  247. "endpoint_guard_extra_steps": 500,
  248. "idempotent_same_target": true,
  249. "latest_wins": true,
  250. "mid_clamp": "1_to_travel_minus_1",
  251. "mid_percent_max": 99,
  252. "mid_percent_min": 1,
  253. "mode": "percent_close",
  254. "open_endpoint_percent": 0,
  255. "percent_max": 100,
  256. "percent_min": 0,
  257. "planner_count": 1,
  258. "rounding": "half_up",
  259. "shared_percent_planner": true
  260. },
  261. "role": "door",
  262. "step_half_cycles": 12500,
  263. "step_rate_hz": 1000
  264. },
  265. "outputs": {
  266. "boot_targets": {
  267. "fan": 10,
  268. "ptc": 0
  269. },
  270. "chamber_ptc_count": 4,
  271. "chamber_ptc_pairs": [
  272. {
  273. "chamber": 1,
  274. "ptc_indices": [
  275. 0,
  276. 1
  277. ]
  278. },
  279. {
  280. "chamber": 2,
  281. "ptc_indices": [
  282. 2,
  283. 3
  284. ]
  285. },
  286. {
  287. "chamber": 3,
  288. "ptc_indices": [
  289. 4,
  290. 5
  291. ]
  292. },
  293. {
  294. "chamber": 4,
  295. "ptc_indices": [
  296. 6,
  297. 7
  298. ]
  299. }
  300. ],
  301. "fan_board_inverts": true,
  302. "fan_channels": [
  303. {
  304. "ball": "B1",
  305. "board_signal": "FAN_PWM3",
  306. "connector": "CON25",
  307. "connector_pin": 7,
  308. "index": 0,
  309. "name": "fan1",
  310. "polarity": "active_low",
  311. "signal": "fan_pwm_out[0]"
  312. },
  313. {
  314. "ball": "C4",
  315. "board_signal": "FAN_PWM1",
  316. "connector": "CON8",
  317. "connector_pin": 7,
  318. "index": 1,
  319. "name": "fan2",
  320. "polarity": "active_low",
  321. "signal": "fan_pwm_out[1]"
  322. },
  323. {
  324. "ball": "B5",
  325. "board_signal": "FAN_PWM2",
  326. "connector": "CON24",
  327. "connector_pin": 7,
  328. "index": 2,
  329. "name": "fan3",
  330. "polarity": "active_low",
  331. "signal": "fan_pwm_out[2]"
  332. },
  333. {
  334. "ball": "A14",
  335. "board_signal": "FAN_PWM4",
  336. "connector": "CON26",
  337. "connector_pin": 7,
  338. "index": 3,
  339. "name": "fan4",
  340. "polarity": "active_low",
  341. "signal": "fan_pwm_out[3]"
  342. }
  343. ],
  344. "fan_connector_active_level": "high",
  345. "fan_count": 4,
  346. "fan_default": 10,
  347. "fan_polarity": "active_low",
  348. "ptc_channels": [
  349. {
  350. "ball": "G16",
  351. "board_signal": "HEAT2",
  352. "connector": "CON18",
  353. "connector_pin": 3,
  354. "index": 0,
  355. "name": "ptc1",
  356. "polarity": "active_high",
  357. "signal": "ptc_pwm_out[0]"
  358. },
  359. {
  360. "ball": "F16",
  361. "board_signal": "HEAT1",
  362. "connector": "CON18",
  363. "connector_pin": 1,
  364. "index": 1,
  365. "name": "ptc2",
  366. "polarity": "active_high",
  367. "signal": "ptc_pwm_out[1]"
  368. },
  369. {
  370. "ball": "N1",
  371. "board_signal": "HEAT8",
  372. "connector": "CON27",
  373. "connector_pin": 3,
  374. "index": 2,
  375. "name": "ptc3",
  376. "polarity": "active_high",
  377. "signal": "ptc_pwm_out[2]"
  378. },
  379. {
  380. "ball": "M1",
  381. "board_signal": "HEAT7",
  382. "connector": "CON27",
  383. "connector_pin": 1,
  384. "index": 3,
  385. "name": "ptc4",
  386. "polarity": "active_high",
  387. "signal": "ptc_pwm_out[3]"
  388. },
  389. {
  390. "ball": "R16",
  391. "board_signal": "HEAT14",
  392. "connector": "CON28",
  393. "connector_pin": 3,
  394. "index": 4,
  395. "name": "ptc5",
  396. "polarity": "active_high",
  397. "signal": "ptc_pwm_out[4]"
  398. },
  399. {
  400. "ball": "P16",
  401. "board_signal": "HEAT13",
  402. "connector": "CON28",
  403. "connector_pin": 1,
  404. "index": 5,
  405. "name": "ptc6",
  406. "polarity": "active_high",
  407. "signal": "ptc_pwm_out[5]"
  408. },
  409. {
  410. "ball": "P9",
  411. "board_signal": "HEAT20",
  412. "connector": "CON29",
  413. "connector_pin": 3,
  414. "index": 6,
  415. "name": "ptc7",
  416. "polarity": "active_high",
  417. "signal": "ptc_pwm_out[6]"
  418. },
  419. {
  420. "ball": "T9",
  421. "board_signal": "HEAT19",
  422. "connector": "CON29",
  423. "connector_pin": 1,
  424. "index": 7,
  425. "name": "ptc8",
  426. "polarity": "active_high",
  427. "signal": "ptc_pwm_out[7]"
  428. }
  429. ],
  430. "ptc_count": 8,
  431. "ptc_default": 0,
  432. "ptc_polarity": "active_high",
  433. "pwm_actual_frequency_hz": 19.993602047,
  434. "pwm_bits": 8,
  435. "pwm_frequency_hz": 20,
  436. "pwm_internal_width": 7,
  437. "pwm_max_duty": 100,
  438. "pwm_phase_count": 100,
  439. "pwm_slot_clks": 1042
  440. },
  441. "profile": "prod2u-normal-multiproject-115200-v1",
  442. "project_id": "prod2u-door-temp",
  443. "protocol": {
  444. "commands": {
  445. "get_motor_status": 3,
  446. "get_temperature": 2,
  447. "motor_status_data": 131,
  448. "set_all": 1,
  449. "temperature_data": 130
  450. },
  451. "crc": {
  452. "coverage": "type_length_payload",
  453. "initial": 65535,
  454. "name": "CRC-16/CCITT-FALSE",
  455. "polynomial": 4129,
  456. "reflect_input": false,
  457. "reflect_output": false,
  458. "wire_order": "little",
  459. "xor_output": 0
  460. },
  461. "get_motor_status": {
  462. "payload_length": 0,
  463. "response": "motor_status_data"
  464. },
  465. "header_hex": "A55A",
  466. "motor_status_data": {
  467. "frame_length": 37,
  468. "layout": "host-contract",
  469. "payload_length": 31
  470. },
  471. "set_all": {
  472. "chamber_ptc_count": 4,
  473. "chamber_ptc_offset": 4,
  474. "door_percent_max": 100,
  475. "door_percent_min": 0,
  476. "door_percent_rejected_example": 101,
  477. "duty_max": 100,
  478. "duty_min": 0,
  479. "exhaust_x_offset": 9,
  480. "exhaust_y_offset": 10,
  481. "fan_offset": 0,
  482. "legacy_payload_length_rejected": 14,
  483. "payload_length": 11,
  484. "response": "none",
  485. "z_door_offset": 8
  486. },
  487. "temperature_data": {
  488. "frame_length": 33,
  489. "payload_length": 27
  490. }
  491. },
  492. "runtime_limit_use": true,
  493. "schema": "prod2u-simple-host-contract-v1",
  494. "temperature": {
  495. "bus": "i2c",
  496. "conversion": {
  497. "profile": "ct7428-msb-integer",
  498. "raw_shift": 7,
  499. "raw_width": 9,
  500. "reject_sign_bit": true
  501. },
  502. "device": "CT7428",
  503. "device_addresses": [
  504. 73,
  505. 72,
  506. 75
  507. ],
  508. "invalid_value": 255,
  509. "maximum_celsius": 150,
  510. "registers": [
  511. 0,
  512. 1,
  513. 2,
  514. 3,
  515. 4,
  516. 5,
  517. 6,
  518. 7,
  519. 8
  520. ],
  521. "scl_ball": "M8",
  522. "sda_ball": "N9",
  523. "value_count": 27
  524. },
  525. "uart": {
  526. "baud": 115200,
  527. "clks_per_bit": 217,
  528. "data_bits": 8,
  529. "flow_control": "none",
  530. "inter_byte_timeout_ms": 10,
  531. "parity": "N",
  532. "rx_ball": "N11",
  533. "stop_bits": 1,
  534. "tx_ball": "M10"
  535. },
  536. "watchdog": {
  537. "enable_after_startup_complete": true,
  538. "target": {
  539. "fan": 10,
  540. "ptc": 0
  541. },
  542. "tick_clks": 12500,
  543. "tick_us": 500,
  544. "timeout_seconds": 30,
  545. "timeout_ticks": 60000
  546. }
  547. }