我在使用TI官方提供的历程(TIDEP0057)时碰到这样的问题:比如下方的使用PRU固件支持BISS编码器协议时
// load firmware
PRUICSS_setPRUBuffer(pruIcss0Handle, 0, (UInt32*)BiSSFirmware, sizeof(BiSSFirmware));
// configure shared memory interface
// clear ICSS0 PRU0 data RAM
memset((void *)(((PRUICSS_HwAttrs *)(pruIcss0Handle->hwAttrs))->baseAddr + 0x0000), 0, (4*1024));
// BiSS encoder configuration: clock_speed=1; crc_bits=8, encoder_bits=12
HW_WR_REG32(((PRUICSS_HwAttrs *)(pruIcss0Handle->hwAttrs))->baseAddr + 0x0000, 0x0001080C);
//Run firmware
PRUICSS_pruExecProgram(pruIcss0Handle, 0);
TaskOSAL_sleep(25);
// write known patterin into position regigister
HW_WR_REG32(((PRUICSS_HwAttrs *)(pruIcss0Handle->hwAttrs))->baseAddr + 0x8, 0xFFFFFFFF);
TaskOSAL_sleep(100);
// check if BiSS encoder has been detected (pattern has been overwritten by PRU firmware)
biss_angle = HW_RD_REG32(((PRUICSS_HwAttrs *)(pruIcss0Handle->hwAttrs))->baseAddr + 0x8);
if(biss_angle == 0xFFFFFFFF)
return;
比如高亮处的代码,我只能看到顶层的程序,至于该地址中写入0x0001080C究竟代表什么我不知道。我想问一下有没有帮助的文档。谢谢。
HG:
// BiSS encoder configuration: clock_speed=1; crc_bits=8, encoder_bits=12 已经有说明了啊
bo LIU19:
回复 HG:
你说的意思我明白。是已经 有说明了,但是那个clock是多少?并没有写。而且因为我不知道他的意思。所以如果我想要修改参数的话。要怎么去修改呢?这点我不太懂。谢谢。
bo LIU19:
回复 HG:
你好:
这个问题我还是没有解决?查看了很多的库文件,都没有找到定义这个参数的地方。希望能得到帮助,不胜感激!