Skip to content

Commit 21c11ca

Browse files
committed
fix(soc): Add the unavailable TRM mentioned RNG_DATA_REG register for C2 and C3
1 parent d30e4d9 commit 21c11ca

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

components/soc/esp32c2/include/soc/wdev_reg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#pragma once
88

99
#include "soc.h"
10+
#include "soc/syscon_reg.h"
1011

1112
/* Hardware random number generator register */
12-
#define WDEV_RND_REG 0x600260b0
13+
#define WDEV_RND_REG RNG_DATA_REG

components/soc/esp32c2/register/soc/syscon_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,8 @@ en only when have access the rom have clock.*/
503503
#define SYSCON_RND_DATA_V 0xFFFFFFFF
504504
#define SYSCON_RND_DATA_S 0
505505

506+
#define RNG_DATA_REG SYSCON_RND_DATA_REG
507+
506508
#define SYSCON_PERI_BACKUP_CONFIG_REG (DR_REG_SYSCON_BASE + 0xB4)
507509
/* SYSCON_PERI_BACKUP_ENA : R/W ;bitpos:[31] ;default: 1'b0 ; */
508510
/*description: reg_peri_backup_ena.*/
Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/*
2+
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
146

157
#pragma once
168

179
#include "soc.h"
10+
#include "soc/syscon_reg.h"
1811

1912
/* Hardware random number generator register */
20-
#define WDEV_RND_REG 0x600260b0
13+
#define WDEV_RND_REG RNG_DATA_REG

components/soc/esp32c3/register/soc/syscon_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,8 @@ extern "C" {
497497
#define SYSCON_RND_DATA_V 0xFFFFFFFF
498498
#define SYSCON_RND_DATA_S 0
499499

500+
#define RNG_DATA_REG SYSCON_RND_DATA_REG
501+
500502
#define SYSCON_PERI_BACKUP_CONFIG_REG (DR_REG_SYSCON_BASE + 0x0B4)
501503
/* SYSCON_PERI_BACKUP_ENA : R/W ;bitpos:[31] ;default: 1'b0 ; */
502504
/*description: */

0 commit comments

Comments
 (0)