您尚未登录。

#1 Re: 全志 SOC » 板子kickpi k2b, 芯片 h618的网卡奇怪问题,初始化成功,无法ping通 » 2025-06-23 17:00:26

调查了一下,好像uboot的board/sunxi下面没有初始化相应的gmac

#2 全志 SOC » 板子kickpi k2b, 芯片 h618的网卡奇怪问题,初始化成功,无法ping通 » 2025-06-22 13:01:07

xred
回复: 1

uboot已经正确识别了网卡: Net:   eth0: ethernet@5020000using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in

CPU:   Allwinner H616 (SUN50I)
Model: Sipeed Longan Pi 3H
DRAM:  2 GiB
Core:  63 devices, 23 uclasses, devicetree: separate
WDT:   Not starting watchdog@30090a0
MMC:   mmc@4020000: 0, mmc@4022000: 1
Loading Environment from FAT... OK
In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Allwinner mUSB OTG (Peripheral)
Net:   eth0: ethernet@5020000using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
, eth1: usb_ether
starting USB...
Bus usb@5200000: USB EHCI 1.00
Bus usb@5200400: USB OHCI 1.0
Bus usb@5310000: USB EHCI 1.00
Bus usb@5310400: USB OHCI 1.0
Bus usb@5311000: USB EHCI 1.00
Bus usb@5311400: USB OHCI 1.0
scanning bus usb@5200000 for devices... 1 USB Device(s) found
scanning bus usb@5200400 for devices... 1 USB Device(s) found
scanning bus usb@5310000 for devices... 1 USB Device(s) found
scanning bus usb@5310400 for devices... 1 USB Device(s) found
scanning bus usb@5311000 for devices... 1 USB Device(s) found
scanning bus usb@5311400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0

设置ip后,无法ping通:192.168.0.142

setenv ipaddr 192.168.0.104
setenv gatewayip 192.168.0.1
setenv netmask 255.255.255.0
setenv serverip 192.168.0.142
saveenv

曾经在某一次启动之后,上述设置可以ping通192.168.0.142了,之后就无法ping通了,使用的dtb为sun50i-h618-longanpi-3h
请问哪位老大遇到过同样的问题吗

#3 Re: Xilinx/Altera/FPGA/CPLD/Verilog » fpga/cpld可以使用无源晶振吗 » 2025-01-07 10:57:57

fxyc87 说:

是可以使用的,但一般不这么玩
需要用到两个IO,两个IO的逻辑就是非门
用verilog弄个非门驱动即可。有可能需要多个非门串联延时,以满足时序。

多谢。
还是老实用有源吧。

#4 Xilinx/Altera/FPGA/CPLD/Verilog » fpga/cpld可以使用无源晶振吗 » 2025-01-06 17:37:58

xred
回复: 5

最近在学习ep240,看到很多fpga/cpld都是用的有源晶振,想知道无源晶振是否可以。无源在启动的时候需要一定的稳定时间,复位引脚加个电容增大一下时间,感觉貌似可以。哪位做过可否告知一下。多谢。

#5 Re: Cortex M0/M3/M4/M7 » STM32G030F6P6这个mcu有用过的吗, ADC是不是很拉跨? » 2023-12-09 18:35:39

经过反复测试和研究,其实这个ADC勉强还凑合,主要是好像没有vref引脚,参考电压直接vcc,所以vcc不能有波动,vcc加了个大电容,adc看起来不错了,
不过比f103还是不如,103很稳,这个感觉还是漂.

#6 Cortex M0/M3/M4/M7 » STM32G030F6P6这个mcu有用过的吗, ADC是不是很拉跨? » 2023-12-08 10:07:02

xred
回复: 5

如题,测试发现这个adc真大很烂,漂的很厉害,有用过的大佬吗?


static void ADC_Config()
{
    // __IO uint32_t wait_loop_index = 0U;

    LL_ADC_InitTypeDef ADC_InitStruct = { 0 };
    LL_ADC_REG_InitTypeDef ADC_REG_InitStruct = { 0 };
    LL_GPIO_InitTypeDef GPIO_InitStruct = { 0 };

    // LL_RCC_SetADCClockSource(LL_RCC_ADC_CLKSOURCE_SYSCLK);
    LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_ADC);

    // ADC1 GPIO Configuration PA3   ------> ADC1_IN3
    LL_IOP_GRP1_EnableClock(LL_IOP_GRP1_PERIPH_GPIOA);
    GPIO_InitStruct.Pin = LL_GPIO_PIN_3;
    GPIO_InitStruct.Mode = LL_GPIO_MODE_ANALOG;
    GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
    LL_GPIO_Init(GPIOA, &GPIO_InitStruct);

    ADC_InitStruct.Clock = LL_ADC_CLOCK_SYNC_PCLK_DIV2;
    ADC_InitStruct.Resolution = LL_ADC_RESOLUTION_12B;
    ADC_InitStruct.DataAlignment = LL_ADC_DATA_ALIGN_RIGHT;
    ADC_InitStruct.LowPowerMode = LL_ADC_LP_MODE_NONE;
    LL_ADC_Init(ADC1, &ADC_InitStruct);
    LL_ADC_REG_SetSequencerConfigurable(ADC1, LL_ADC_REG_SEQ_CONFIGURABLE);

    /* Poll for ADC channel configuration ready */
    while (LL_ADC_IsActiveFlag_CCRDY(ADC1) == 0) { }
    LL_ADC_ClearFlag_CCRDY(ADC1);

    ADC_REG_InitStruct.TriggerSource = LL_ADC_REG_TRIG_SOFTWARE;
    ADC_REG_InitStruct.SequencerLength = LL_ADC_REG_SEQ_SCAN_DISABLE;
    ADC_REG_InitStruct.SequencerDiscont = LL_ADC_REG_SEQ_DISCONT_DISABLE;
    ADC_REG_InitStruct.ContinuousMode = LL_ADC_REG_CONV_SINGLE;
    ADC_REG_InitStruct.DMATransfer = LL_ADC_REG_DMA_TRANSFER_NONE;
    ADC_REG_InitStruct.Overrun = LL_ADC_REG_OVR_DATA_PRESERVED;
    LL_ADC_REG_Init(ADC1, &ADC_REG_InitStruct);
    LL_ADC_SetOverSamplingScope(ADC1, LL_ADC_OVS_DISABLE);
    LL_ADC_SetTriggerFrequencyMode(ADC1, LL_ADC_CLOCK_FREQ_MODE_LOW);

    LL_ADC_SetSamplingTimeCommonChannels(ADC1, LL_ADC_SAMPLINGTIME_COMMON_1, LL_ADC_SAMPLINGTIME_79CYCLES_5);
    LL_ADC_SetSamplingTimeCommonChannels(ADC1, LL_ADC_SAMPLINGTIME_COMMON_2, LL_ADC_SAMPLINGTIME_79CYCLES_5);
    LL_ADC_DisableIT_EOC(ADC1);
    LL_ADC_DisableIT_EOS(ADC1);

    /* Enable ADC internal voltage regulator */
    LL_ADC_EnableInternalRegulator(ADC1);
    LL_mDelay(1);

    // 调用这个之前必须要EnableInternalRegulator
    LL_ADC_REG_SetSequencerRanks(ADC1, LL_ADC_REG_RANK_1, LL_ADC_CHANNEL_3);

    while (LL_ADC_IsActiveFlag_CCRDY(ADC1) == 0) { }
    LL_ADC_ClearFlag_CCRDY(ADC1);

    LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_3, LL_ADC_SAMPLINGTIME_COMMON_1);

    if (LL_ADC_IsEnabled(ADC1) == 0) {
        LL_mDelay(100);

        LL_ADC_EnableInternalRegulator(ADC1);
        LL_mDelay(1);

        // 校准
        LL_ADC_StartCalibration(ADC1);
        while (LL_ADC_IsCalibrationOnGoing(ADC1) != 0) { }

        LL_ADC_Enable(ADC1);
        /* Poll for ADC ready to convert */
        while (LL_ADC_IsActiveFlag_ADRDY(ADC1) == 0) { }
        DebugPrint("adc ready\n");
    }
}

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn