Skip to content

machine.Pin() PR feedback#159

Draft
jaenrig-ifx wants to merge 690 commits into
psoc-edge-mainfrom
machine-pin-config-pr-feedback
Draft

machine.Pin() PR feedback#159
jaenrig-ifx wants to merge 690 commits into
psoc-edge-mainfrom
machine-pin-config-pr-feedback

Conversation

@jaenrig-ifx

Copy link
Copy Markdown
Member
  • Changes for mode and pull configurations as discussed in PR.
  • Reviewed reinitialization values .
  • Added basic parameter validation.
  • Removed unrequired functions from mphalport.

@jaenrig-ifx jaenrig-ifx force-pushed the machine-pin-config-pr-feedback branch from 2371473 to 11c8c4d Compare July 8, 2026 14:58
IFX-Anusha added 28 commits July 9, 2026 07:23
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
PBUF_POOL_SIZE=400 was copied from an MTB reference app and allocated
~640 KB of static BSS in memp.o, overflowing the 256 KB m33_data region.
24 is sufficient for MicroPython use and matches the PSoC6 port value.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
cy_wcm_init() downloads WiFi firmware to the chip and blocks for several
seconds, preventing mpremote from entering raw REPL before the timeout.
Move it out of network_init() into wcm_ensure_init() which is called
lazily from make_new when the user creates a WLAN object.

network_init() now only performs SDIO hardware setup (fast, non-blocking)
so the REPL is available immediately after boot.

Also remove debug printf noise from mpy_task to match PSoC6 main.c.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
- COMPONENT_55500A1: required to select correct chip variant code paths.
- BLHS_SUPPORT + TRXV5: required for CYW55500 ROM bootloader handshake.
- CY_WIFI_COUNTRY=WHD_COUNTRY_UNITED_STATES: match bsp.mk country setting.
- CYBSP_WIFI_WL_HOSTWAKE_DRIVE_MODE/INIT_STATE: match BSP host-wake config.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
- Add WHD_CLM_FILE pointing to CYW55513_MOD_PSE84_SOM/55500A1.clm_blob.
- Remove -DNO_CLM_BLOB_FILE so WHD downloads the CLM to firmware.
- Add CLM_IMAGE_SIZE/CLM_IMAGE_NAME so the blob is linked into the build.
  Without this the firmware rejects WLC_SET_COUNTRY and WiFi init fails.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
wifi_sdio_init() and Cy_SysPm_RegisterCallback() are moved into a new
network_hw_init() called once before the soft_reset loop. This prevents
repeated SDIO re-initialization on every soft reset and, more critically,
fixes a bug where Cy_SysPm_RegisterCallback() was called on every soft
reset, corrupting the SysPm callback linked list (the board configures
CY_CFG_PWR_SYS_IDLE_MODE = CY_CFG_PWR_MODE_DEEPSLEEP).

network_init() now only calls cy_wcm_init() and network_deinit() only
calls cy_wcm_deinit(), matching the PSoC6 port's per-reset lifecycle.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Implements WLAN.scan() to discover available WiFi networks:
- Returns list of (ssid, bssid, channel, rssi, security, hidden) tuples.
- Supports optional ssid= keyword filter for targeted scans.
- Uses WCM scan callback pattern with polling loop.
- Security type mapping to MicroPython constants (OPEN=0, WPA2=3).
- STA-only operation; raises ValueError on AP interface.
- Tested and verified working on KIT_PSE84_AI board.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Implements WLAN.status() for link quality and AP client info:
- STA: status('rssi') returns signal strength in dBm.
- AP: status('stations') returns list of connected client MACs.
- Supports both STA and AP interfaces with proper error handling.
- Uses cy_wcm_get_associated_ap_info() for STA RSSI.
- Uses cy_wcm_get_associated_client_list() for AP clients.
- Tested on board: RSSI returns -44, stations enumerates correctly.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
- Zero-initialize scan filter before use.

- Yield in scan wait loop to avoid busy-spinning.

- Use OPEN security when key is absent; UNKNOWN otherwise.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
jaenrig-ifx and others added 17 commits July 9, 2026 07:23
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Add signal generator and measurer scripts for machine.time_pulse_us()
multi-board HIL test on KIT_PSE84_AI, along with expected output file
and hw-connections.md wiring entry. Reuses existing P16_0/P16_1
cross-board connections.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Pin.deinit() is not supported on psoc-edge.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Use multitest.broadcast/wait to ensure instance1 is inside
time_pulse_us before instance0 drives the pulse. Update exp
file with blank line emitted by multitest.wait.

Signed-off-by: IFX-Anusha <Anusha.TR@infineon.com>
Signed-off-by: AkshayChandra-IFX <akshaychandra.nagzarkar@infineon.com>
Signed-off-by: AkshayChandra-IFX <akshaychandra.nagzarkar@infineon.com>
Signed-off-by: AkshayChandra-IFX <akshaychandra.nagzarkar@infineon.com>
Signed-off-by: AkshayChandra-IFX <akshaychandra.nagzarkar@infineon.com>
Signed-off-by: AkshayChandra-IFX <akshaychandra.nagzarkar@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Comment thread .github/workflows/ports_psoc-edge-ifx.yml Fixed
Comment thread .github/workflows/ports_psoc-edge-ifx.yml Fixed
Comment thread .github/workflows/ports_psoc-edge.yml Fixed
Comment thread .github/workflows/stale_issues.yml Fixed
Comment thread .github/workflows/synch_upstream.yml Fixed
Comment thread .github/workflows/synch_upstream.yml Fixed
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
@jaenrig-ifx jaenrig-ifx force-pushed the machine-pin-config-pr-feedback branch from 0566c3c to 57417ac Compare July 9, 2026 10:58
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants