Settings | Sign in | Sign up

There are currently 5 posts.

CYWL6208-GS读取Chip ID的方法

Floor 1 巨大八爪鱼 4/7/25 21:52
/* 设置Backplane地址的高17位 */
static void WiFi_SetBackplaneWindow(uint32_t addr)
{
  addr &= 0xffff8000;
  WiFi_LowLevel_WriteReg(1, 0x1000c, addr >> 24);
  WiFi_LowLevel_WriteReg(1, 0x1000b, (addr >> 16) & 0xff);
  WiFi_LowLevel_WriteReg(1, 0x1000a, (addr >> 8) & 0xff);
}

/* 读取Backplane值 */
void WiFi_ReadBackplaneValue(uint32_t addr, void *buffer, uint8_t len)
{
  uint8_t *p = buffer;
 
  WiFi_SetBackplaneWindow(addr);
 
  // 取Backplane地址的低15位
  addr &= 0x7fff; // sb offset addr is <= 15 bits, 32k
  if (len == 4)
    addr |= 0x8000; // with b15, maps to 32-bit SB access
 
  while (len > 0)
  {
    *p = WiFi_LowLevel_ReadReg(1, addr);
    addr++;
    p++;
    len--;
  }
  WiFi_SetBackplaneWindow(0x18000000);
}

uint16_t value;
printf("----------------------------------------------\n");
WiFi_ReadBackplaneValue(0x18000000, &value, 2);
printf("Chip ID: %d\n", value);
Floor 2 巨大八爪鱼 4/7/25 21:52
读出来的chip id是43430。
Floor 3 巨大八爪鱼 4/7/25 21:53
另外,SDIO CIS信息里面的0xa9a6换算成十进制也是43430。
Floor 4 巨大八爪鱼 4/7/25 22:02
Floor 5 巨大八爪鱼 11/2/25 18:26

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.