Author |
Message |
Topic: Problem calling function when passing structure *Workaround* |
samikool
Replies: 11
Views: 28050
|
Forum: General CCS C Discussion Posted: Tue Jun 08, 2021 8:06 am Subject: Problem calling function when passing structure *Workaround* |
Another very interesting find.
After finding and solving some other bugs in the program, I reran the old structure set up and the fault changed. This time I got an oscillator fault.
OSCILLATOR ... |
Topic: Problem calling function when passing structure *Workaround* |
samikool
Replies: 11
Views: 28050
|
Forum: General CCS C Discussion Posted: Tue Jun 08, 2021 7:54 am Subject: Problem calling function when passing structure *Workaround* |
Oh wow very interesting find.
Right now our main.h doesn't seem too crazy:
#ifndef MAIN_H
#define MAIN_H
#case
/************************************************************************ ... |
Topic: Problem calling function when passing structure *Workaround* |
samikool
Replies: 11
Views: 28050
|
Forum: General CCS C Discussion Posted: Mon Jun 07, 2021 8:11 am Subject: Problem calling function when passing structure *Workaround* |
On emailing with CCS they told me to include pcd_traps.c which I had not used before but indeed it seems to give a memory access violation.
Error:
ADDRESS FAULT PC:73A2 W0:DE3 W1:E12 ... |
Topic: Problem calling function when passing structure *Workaround* |
samikool
Replies: 11
Views: 28050
|
Forum: General CCS C Discussion Posted: Thu Jun 03, 2021 12:32 pm Subject: Problem calling function when passing structure *Workaround* |
I'd actually try reversing the variables in the function declaration.
I can confirm that this works.
So then this is definitely something in the compiler. I will add this to the email threa ... |
Topic: Problem calling function when passing structure *Workaround* |
samikool
Replies: 11
Views: 28050
|
Forum: General CCS C Discussion Posted: Thu Jun 03, 2021 11:57 am Subject: Problem calling function when passing structure *Workaround* |
Interesting update.
I found that changing the structure of a slope, can "fix" the issue.
The original slope structure is as follows
typedef struct {
double m;
dou ... |
Topic: Problem calling function when passing structure *Workaround* |
samikool
Replies: 11
Views: 28050
|
Forum: General CCS C Discussion Posted: Thu Jun 03, 2021 11:06 am Subject: Problem calling function when passing structure *Workaround* |
Hello guys,
I am working with a PIC24FJ256GA106, and CCSC version 5.103, and running into a weird issue with my software.
I have a function that takes uint8_t and a slope typedef structure I def ... |
Topic: Command line compiler and hex files to their own folder |
samikool
Replies: 6
Views: 19809
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 8:06 am Subject: Command line compiler and hex files to their own folder |
When calling the ccsc command, you can give an out="outputPath" argument. From what I understand it doesn't always work, but it has worked for me in the past. It is in the manual under argum ... |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Fri Apr 09, 2021 3:09 pm Subject: **SOLVED** SPI data on wire but not being read |
Alright guys I have solved the issue, and its a funny fix in hindsight.
I didn't mention because I didn't think it would be totally relevant but there are several SPI devices on the bus. In the cou ... |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Fri Apr 09, 2021 2:10 pm Subject: **SOLVED** SPI data on wire but not being read |
Sorry yes a lot of this stuff is hidden or tucked away in the driver. I do "control" the cs line by specifying the pin it is connected to on the board. Then the driver actually contains the ... |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Fri Apr 09, 2021 7:59 am Subject: **SOLVED** SPI data on wire but not being read |
Quick update after adding the fuse you suggested it did seem to makes things more consistent. I now can get the correct baud-rate without putting a random delay at the start of my main. Additionally i ... |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Fri Apr 09, 2021 7:28 am Subject: **SOLVED** SPI data on wire but not being read |
Again thanks for the advice guys! I will be back at it again today, and update later.
I forgot to add in response to your question Ttelmah, it is the lower clock speed that's working. I think in on ... |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Thu Apr 08, 2021 10:59 am Subject: **SOLVED** SPI data on wire but not being read |
Okay guys I have a lead as to what I think is happenening, and hopefully someone can make sense of this. I switched over to using the spi_transfer_read/write functions, and they now look like this. I ... |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Thu Apr 08, 2021 8:02 am Subject: **SOLVED** SPI data on wire but not being read |
Thanks for the advice guys, I will work on both of these today and post my results. |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Wed Apr 07, 2021 3:37 pm Subject: **SOLVED** SPI data on wire but not being read |
I do only use it one time, so like you mentioned, from my understanding from browsing the forum I shouldn't need to specify the stream or use the spi_init function. |
Topic: **SOLVED** SPI data on wire but not being read |
samikool
Replies: 14
Views: 32290
|
Forum: General CCS C Discussion Posted: Wed Apr 07, 2021 1:18 pm Subject: **SOLVED** SPI data on wire but not being read |
Hello guys it's my first time postings so let me know if I miss anything I need to include, but I'm going to try and get every thing in here.
Some background, I'm working with the wiznet 850io, whi ... |
|