- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include <stdio.h>
#include "system.h"
#include "io.h"
int main(){
//result variable
int ready = 0, crc_seq=0;
//declare pointer
int *base = (int*) CRC_0_BASE;
//Generator Poly 0xd5
int genPoly = 213 & 0xff;
//0x0a55, 0x0a56, 0x0a57, 0x0a58, 0x0a59
int data[5] = {2645, 2646, 2647, 2648, 2649};
//write genPoly down to design
*(base) = genPoly;
for(int i=0; i < 5; i++){
ready = *(base+3)&0x1;
printf("\nHello Nios II!");
if(ready ==1){
*(base+1) = data[i]&0xffff; //0x0a55
crc_seq = *(base+2);
printf("\ncrc_seq = %d", crc_seq);
//decimalToBinary(crc_seq);
}else{
printf("\ncrc calculator is busy");
}
}
return 0;
}
My issue: i do not see any contents of printf function in this code. Please help me. Thanks.
My issue: i do not see any contents of printf function in this code. Please help me. Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manprocoder,
I do not understand what your desciption? Is it compilation error or you are not able to see any printf logs?
Thanks.
Regards,
Aik Eu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Manprocoder,
Good day, just following up on the previous clarification.
By any chances did you managed to look into it? Do let us know the error that you are seeing.
And just to add, there are settings in the BSP required to use the HAL API.
More information can be found in the link below:
Hope to hear from you soon.
Best Wishes
BB
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page