Xilinx / Xilinx/embeddedsw

lwIP port: Assert in taskENTER_CRITICAL() due to bug in emacps_error_handler().

Open
#24 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

While I'm unsure of exactly what the required conditions are for this issue to occur, it has happened to me a couple of times over the past week. Fortunately, the cause wasn't too difficult to find:

emacps_error_handler() in xemacpsif_hw.c is called from interrupt context. Unlike its "sister" functions, emacpsif_send_handler() and emacpsif_recv_handler(), it fails to increase xInsideISR as it should. This can result in xQueueSend() being called instead of xQueueSendFromISR().

So, just do the proper xInsideISR++ and xInsideISR-- in emacps_error_handler().

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies emacps_error_handler() in xemacpsif_hw.c; start by comparing it with emacpsif_send_handler() and emacpsif_recv_handler(). Verify the ISR bookkeeping and queue-call path, then build or run the relevant embedded software checks to confirm the interrupt-context assertion is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.