You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I don't know much about the reed Solomon coding but i have to implement one of the error correction method for my data on UART.
Maximum data length is 32 bytes.
I kept the minimum distance 32,polynomial 0x1f5 and it looks like it is able to recover up to 16 bytes of corrupted data.Can you please confirm if the behaviour is correct or not. also is it possible to increase the error correction rate from 16 byte to more?
//Writing dummy data to buffers
while(1){
printf("======================================================START======================================================\n");
for (int i = 0; i < sizeof(msg); i++)
msg[i] = i;
Hi,
I don't know much about the reed Solomon coding but i have to implement one of the error correction method for my data on UART.
Maximum data length is 32 bytes.
I kept the minimum distance 32,polynomial 0x1f5 and it looks like it is able to recover up to 16 bytes of corrupted data.Can you please confirm if the behaviour is correct or not. also is it possible to increase the error correction rate from 16 byte to more?
#include "correct.h"
#include <stdint.h>
#include <stdio.h>
#include<string.h>
#include <time.h>
#include <stdlib.h>
#define ERROR -1
#define MIN_DISTANCE 32U
int EncodeBuffer(uint8_t * original_buff,uint8_t *encodedBuff,uint8_t len);
int DecodeBuffer(uint8_t * encoded_buff,uint8_t *original_buff,uint8_t len);
/Globals/
uint8_t msg[32];
uint8_t msg_out[64];
uint8_t msg_in[32];
int main(void)
{
#if 1
srand(time(NULL));
//Writing dummy data to buffers
while(1){
printf("======================================================START======================================================\n");
for (int i = 0; i < sizeof(msg); i++)
msg[i] = i;
#endif
}
int EncodeBuffer(uint8_t * original_buff,uint8_t *encodedBuff,uint8_t len)
{
int code = 0;
}
int DecodeBuffer(uint8_t * encoded_buff,uint8_t *original_buff,uint8_t len)
{
int code = 0;
}
///////////////////////////////////////////OUTPUT
======================================================START======================================================
Original MSG
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
MSG Encoded
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 4A 9D 11 9 28 61 FC AE A4 AF 8D FA 4D C6 D7 97 46 56 76 30 CE D8 4C 3A C6 63 9B FB C7 53 8E 58
error MSG
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 4A 9D 11 9 28 61 FC AE A4 AF 8D FA 4D C6 D7 97 46 56 76 30 CE D8 4C 3A C6 63 9B FB C7 53 8E 58
No of bytes decoded = 32
MSG decoded successfully
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
======================================================END======================================================
The text was updated successfully, but these errors were encountered: