nasa / nasa/CS

CS CRC values may lead to confusion

Open
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-further-investigation
Dominant language
C
Stars
36
Forks
41
Avg merge
11d 19h
Merged PRs (30d)
2

Description

The CS application relies on the CFE_ES_CalculateCRC function to report the CRCs that it calculates. However, this function calculates the CRC as an int16 value and returns that value as a uint32 value. This causes the sign bit of the int16 (bit 15) to be propagated to the upper 16 bits of the uint32. If this bit is set, it can cause confusion since a CRC of 0x845E would result in the CS application having a value of 0xFFFF845E.

Imported from GSFCCFS-929

Contributor guide

Open the contributing guide

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

Start by reading CFE_ES_CalculateCRC and its use in the CS application, focusing on how the int16 result becomes a uint32 value. Confirm the expected representation for a CRC such as 0x845E, then verify that the reported value no longer includes unintended upper bits.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.